summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--3rdparty/README.md55
-rw-r--r--3rdparty/compat/mingw/xaudio2.h6491
-rw-r--r--3rdparty/luv/.ci/install.bat270
-rw-r--r--3rdparty/luv/.ci/platform.sh15
-rw-r--r--3rdparty/luv/.ci/set_compiler_env.bat40
-rw-r--r--3rdparty/luv/.ci/setenv_lua.sh3
-rw-r--r--3rdparty/luv/.ci/setup_lua.sh122
-rw-r--r--3rdparty/luv/.ci/winmake.bat457
-rw-r--r--3rdparty/luv/.gitignore10
-rw-r--r--3rdparty/luv/.travis.yml36
-rw-r--r--3rdparty/luv/CMakeLists.txt191
-rw-r--r--3rdparty/luv/LICENSE.txt202
-rw-r--r--3rdparty/luv/Makefile61
-rw-r--r--3rdparty/luv/README.md213
-rw-r--r--3rdparty/luv/appveyor.yml42
-rw-r--r--3rdparty/luv/cmake/Modules/FindLibuv.cmake11
-rw-r--r--3rdparty/luv/cmake/Modules/FindLuaJIT.cmake55
-rw-r--r--3rdparty/luv/deps/lua.cmake128
-rw-r--r--3rdparty/luv/deps/lua_one.c97
-rw-r--r--3rdparty/luv/deps/luajit.cmake407
-rw-r--r--3rdparty/luv/deps/uv.cmake224
-rw-r--r--3rdparty/luv/docs.md1309
-rw-r--r--3rdparty/luv/examples/cqueues-main.lua31
-rw-r--r--3rdparty/luv/examples/cqueues-slave.lua55
-rw-r--r--3rdparty/luv/examples/echo-server-client.lua68
-rw-r--r--3rdparty/luv/examples/killing-children.lua24
-rw-r--r--3rdparty/luv/examples/lots-o-dns.lua49
-rw-r--r--3rdparty/luv/examples/repl.lua89
-rw-r--r--3rdparty/luv/examples/talking-to-children.lua47
-rw-r--r--3rdparty/luv/examples/tcp-cluster.lua84
-rw-r--r--3rdparty/luv/examples/timers.lua68
-rw-r--r--3rdparty/luv/examples/uvbook/helloworld.lua5
-rw-r--r--3rdparty/luv/examples/uvbook/idle-basic.lua14
-rw-r--r--3rdparty/luv/examples/uvbook/onchange.lua30
-rw-r--r--3rdparty/luv/examples/uvbook/queue-work.lua19
-rw-r--r--3rdparty/luv/examples/uvbook/tcp-echo-client.lua21
-rw-r--r--3rdparty/luv/examples/uvbook/tcp-echo-server.lua22
-rw-r--r--3rdparty/luv/examples/uvbook/thread-create.lua38
-rw-r--r--3rdparty/luv/examples/uvbook/uvcat.lua37
-rw-r--r--3rdparty/luv/examples/uvbook/uvtee.lua35
-rw-r--r--3rdparty/luv/lib/tap.lua165
-rw-r--r--3rdparty/luv/lib/utils.lua165
-rw-r--r--3rdparty/luv/luv-1.8.0-4.rockspec34
-rw-r--r--3rdparty/luv/msvcbuild.bat13
-rw-r--r--3rdparty/luv/src/async.c63
-rw-r--r--3rdparty/luv/src/check.c59
-rw-r--r--3rdparty/luv/src/constants.c649
-rw-r--r--3rdparty/luv/src/dns.c296
-rw-r--r--3rdparty/luv/src/fs.c614
-rw-r--r--3rdparty/luv/src/fs_event.c97
-rw-r--r--3rdparty/luv/src/fs_poll.c90
-rw-r--r--3rdparty/luv/src/handle.c173
-rw-r--r--3rdparty/luv/src/idle.c59
-rw-r--r--3rdparty/luv/src/lhandle.c116
-rw-r--r--3rdparty/luv/src/lhandle.h67
-rw-r--r--3rdparty/luv/src/loop.c92
-rw-r--r--3rdparty/luv/src/lreq.c71
-rw-r--r--3rdparty/luv/src/lreq.h43
-rw-r--r--3rdparty/luv/src/lthreadpool.h48
-rw-r--r--3rdparty/luv/src/luv.c519
-rw-r--r--3rdparty/luv/src/luv.h109
-rw-r--r--3rdparty/luv/src/misc.c316
-rw-r--r--3rdparty/luv/src/pipe.c114
-rw-r--r--3rdparty/luv/src/poll.c100
-rw-r--r--3rdparty/luv/src/prepare.c59
-rw-r--r--3rdparty/luv/src/process.c266
-rw-r--r--3rdparty/luv/src/req.c52
-rw-r--r--3rdparty/luv/src/schema.c16
-rw-r--r--3rdparty/luv/src/signal.c72
-rw-r--r--3rdparty/luv/src/stream.c263
-rw-r--r--3rdparty/luv/src/tcp.c182
-rw-r--r--3rdparty/luv/src/thread.c353
-rw-r--r--3rdparty/luv/src/timer.c84
-rw-r--r--3rdparty/luv/src/tty.c65
-rw-r--r--3rdparty/luv/src/udp.c260
-rw-r--r--3rdparty/luv/src/util.c56
-rw-r--r--3rdparty/luv/src/util.h26
-rw-r--r--3rdparty/luv/src/work.c224
-rw-r--r--3rdparty/luv/tests/manual-test-cluster.lua213
-rw-r--r--3rdparty/luv/tests/run.lua33
-rw-r--r--3rdparty/luv/tests/test-async.lua32
-rw-r--r--3rdparty/luv/tests/test-conversions.lua6
-rw-r--r--3rdparty/luv/tests/test-dns.lua125
-rw-r--r--3rdparty/luv/tests/test-fs.lua90
-rw-r--r--3rdparty/luv/tests/test-leaks.lua186
-rw-r--r--3rdparty/luv/tests/test-misc.lua85
-rw-r--r--3rdparty/luv/tests/test-prepare-check-idle-async.lua49
-rw-r--r--3rdparty/luv/tests/test-process.lua101
-rw-r--r--3rdparty/luv/tests/test-sigchld-after-lua_close.sh45
-rw-r--r--3rdparty/luv/tests/test-signal.lua40
-rw-r--r--3rdparty/luv/tests/test-tcp.lua114
-rw-r--r--3rdparty/luv/tests/test-thread.lua47
-rw-r--r--3rdparty/luv/tests/test-timer.lua87
-rw-r--r--3rdparty/luv/tests/test-work.lua48
-rw-r--r--3rdparty/win81sdk/Include/um/xaudio2.h1196
-rw-r--r--LICENSE.md365
-rw-r--r--README.md70
-rw-r--r--artwork/LICENSE116
-rw-r--r--artwork/README.md5
-rw-r--r--benchmarks/LICENSE27
-rw-r--r--benchmarks/README.md5
-rw-r--r--benchmarks/eminline_native.cpp3
-rw-r--r--benchmarks/eminline_noasm.cpp3
-rw-r--r--benchmarks/main.cpp3
-rw-r--r--bgfx/LICENSE27
-rw-r--r--bgfx/README.md5
-rw-r--r--docs/LICENSE116
-rw-r--r--docs/README.md5
-rw-r--r--docs/mame.txt82
-rw-r--r--docs/mamelicense.txt40
-rw-r--r--doxygen/LICENSE116
-rw-r--r--hash/LICENSE116
-rw-r--r--hash/README.md6
-rw-r--r--hash/ibm5170.xml20
-rw-r--r--keymaps/LICENSE116
-rw-r--r--keymaps/README.md6
-rw-r--r--language/Afrikaans/strings.po34
-rw-r--r--language/Albanian/strings.po34
-rw-r--r--language/Arabic/strings.po34
-rw-r--r--language/Basque/strings.po34
-rw-r--r--language/Belarusian/strings.po34
-rw-r--r--language/Bosnian/strings.po34
-rw-r--r--language/Bulgarian/strings.po34
-rw-r--r--language/Burmese/strings.po34
-rw-r--r--language/Catalan/strings.po34
-rw-r--r--language/Chinese_Simplified/strings.po63
-rw-r--r--language/Chinese_Traditional/strings.po63
-rw-r--r--language/Croatian/strings.po34
-rw-r--r--language/Czech/strings.po34
-rw-r--r--language/Danish/strings.po34
-rw-r--r--language/Dutch/strings.po34
-rw-r--r--language/English/strings.po34
-rw-r--r--language/Estonian/strings.po34
-rw-r--r--language/Finnish/strings.po34
-rw-r--r--language/French/strings.po63
-rw-r--r--language/French_Belgium/strings.po247
-rw-r--r--language/French_Canada/strings.po34
-rw-r--r--language/Georgian/strings.po34
-rw-r--r--language/German/strings.po63
-rw-r--r--language/Greek/strings.po63
-rw-r--r--language/Hebrew/strings.po34
-rw-r--r--language/Hindi/strings.po34
-rw-r--r--language/Hungarian/strings.po34
-rw-r--r--language/Indonesian/strings.po34
-rw-r--r--language/Italian/strings.po63
-rw-r--r--language/Japanese/strings.po112
-rw-r--r--language/Korean/strings.po34
-rw-r--r--language/LICENSE116
-rw-r--r--language/Latvian/strings.po34
-rw-r--r--language/Lithuanian/strings.po34
-rw-r--r--language/Macedonian/strings.po34
-rw-r--r--language/Norwegian/strings.po34
-rw-r--r--language/Persian/strings.po34
-rw-r--r--language/Polish/strings.po34
-rw-r--r--language/Portuguese/strings.po34
-rw-r--r--language/Portuguese_Brazil/strings.po405
-rw-r--r--language/README.md5
-rw-r--r--language/Romanian/strings.po34
-rw-r--r--language/Russian/strings.po63
-rw-r--r--language/Serbian/strings.po63
-rw-r--r--language/Serbian_Cyrillic/strings.po65
-rw-r--r--language/Slovak/strings.po34
-rw-r--r--language/Slovenian/strings.po34
-rw-r--r--language/Spanish/strings.po343
-rw-r--r--language/Spanish_Mexico/strings.po34
-rw-r--r--language/Swedish/strings.po34
-rw-r--r--language/Thai/strings.po34
-rw-r--r--language/Turkish/strings.po34
-rw-r--r--language/Ukrainian/strings.po34
-rw-r--r--language/Vietnamese/strings.po34
-rw-r--r--nl_examples/7400_astable.c2
-rw-r--r--nl_examples/74123_mstable.c2
-rw-r--r--nl_examples/9602_mstable.c2
-rw-r--r--nl_examples/bjt.c2
-rw-r--r--nl_examples/bjt_eb.c2
-rw-r--r--nl_examples/bjt_eb_pnp.c2
-rw-r--r--nl_examples/breakout.c3
-rw-r--r--nl_examples/cd4066.c2
-rw-r--r--nl_examples/cdelay.c2
-rw-r--r--nl_examples/congo_bongo.c3
-rw-r--r--nl_examples/kidniki.c3
-rw-r--r--nl_examples/mm5837_noise.c2
-rw-r--r--nl_examples/msx_mixer_stage.c2
-rw-r--r--nl_examples/ne555_astable.c2
-rw-r--r--nl_examples/opamp.c2
-rw-r--r--nl_examples/sn74ls629_osc.c2
-rw-r--r--nl_examples/test.c2
-rw-r--r--nl_examples/todo.c2
-rw-r--r--nl_examples/vccs.c2
-rw-r--r--nl_examples/vccs1.c2
-rw-r--r--nl_examples/vs_cs.c2
-rw-r--r--plugins/README.md3
-rw-r--r--plugins/boot.lua5
-rw-r--r--plugins/coro-channel/LICENSE22
-rw-r--r--plugins/coro-channel/README.md2
-rw-r--r--plugins/coro-channel/init.lua128
-rw-r--r--plugins/coro-channel/plugin.json8
-rw-r--r--plugins/coro-fs/LICENSE22
-rw-r--r--plugins/coro-fs/README.md2
-rw-r--r--plugins/coro-fs/init.lua222
-rw-r--r--plugins/coro-fs/plugin.json8
-rw-r--r--plugins/coro-http/LICENSE22
-rw-r--r--plugins/coro-http/README.md2
-rw-r--r--plugins/coro-http/init.lua187
-rw-r--r--plugins/coro-http/plugin.json8
-rw-r--r--plugins/coro-net/LICENSE22
-rw-r--r--plugins/coro-net/README.md2
-rw-r--r--plugins/coro-net/init.lua113
-rw-r--r--plugins/coro-net/plugin.json8
-rw-r--r--plugins/coro-tls/LICENSE22
-rw-r--r--plugins/coro-tls/README.md2
-rw-r--r--plugins/coro-tls/init.lua122
-rw-r--r--plugins/coro-tls/plugin.json8
-rw-r--r--plugins/coro-wrapper/LICENSE22
-rw-r--r--plugins/coro-wrapper/README.md2
-rw-r--r--plugins/coro-wrapper/init.lua41
-rw-r--r--plugins/coro-wrapper/plugin.json8
-rw-r--r--plugins/dummy/init.lua4
-rw-r--r--plugins/http-codec/LICENSE202
-rw-r--r--plugins/http-codec/README.md2
-rw-r--r--plugins/http-codec/init.lua291
-rw-r--r--plugins/http-codec/plugin.json8
-rw-r--r--plugins/json/init.lua3
-rw-r--r--plugins/mime/LICENSE22
-rw-r--r--plugins/mime/README.md2
-rw-r--r--plugins/mime/init.lua194
-rw-r--r--plugins/mime/plugin.json8
-rw-r--r--plugins/path/LICENSE202
-rw-r--r--plugins/path/README.md2
-rw-r--r--plugins/path/init.lua139
-rw-r--r--plugins/path/plugin.json8
-rw-r--r--plugins/pretty-print/LICENSE202
-rw-r--r--plugins/pretty-print/README.md2
-rw-r--r--plugins/pretty-print/init.lua362
-rw-r--r--plugins/pretty-print/plugin.json8
-rw-r--r--plugins/querystring/LICENSE202
-rw-r--r--plugins/querystring/README.md2
-rw-r--r--plugins/querystring/init.lua105
-rw-r--r--plugins/querystring/plugin.json8
-rw-r--r--plugins/weblit/LICENSE22
-rw-r--r--plugins/weblit/README.md239
-rw-r--r--plugins/weblit/app.lua261
-rw-r--r--plugins/weblit/auto-headers.lua92
-rw-r--r--plugins/weblit/etag-cache.lua39
-rw-r--r--plugins/weblit/init.lua8
-rw-r--r--plugins/weblit/logger.lua10
-rw-r--r--plugins/weblit/plugin.json8
-rw-r--r--plugins/weblit/static.lua62
-rw-r--r--plugins/weblit/websocket.lua82
-rw-r--r--plugins/webserver/init.lua34
-rw-r--r--plugins/webserver/plugin.json9
-rw-r--r--plugins/websocket-codec/LICENSE22
-rw-r--r--plugins/websocket-codec/README.md2
-rw-r--r--plugins/websocket-codec/init.lua261
-rw-r--r--plugins/websocket-codec/plugin.json8
-rw-r--r--regtests/LICENSE27
-rw-r--r--regtests/README.md5
-rw-r--r--samples/LICENSE116
-rw-r--r--samples/README.md5
-rw-r--r--scripts/build/makelist.py13
-rw-r--r--scripts/src/3rdparty.lua58
-rw-r--r--scripts/src/main.lua1
-rw-r--r--scripts/src/osd/modules.lua8
-rw-r--r--scripts/src/osd/windows.lua1
-rw-r--r--scripts/target/mame/arcade.lua11
-rw-r--r--scripts/target/mame/mess.lua7
-rw-r--r--shaders/README.md3
-rw-r--r--src/devices/bus/isa/isa_cards.cpp2
-rw-r--r--src/devices/cpu/arcompact/arcompact_make.py3
-rw-r--r--src/devices/cpu/h8/h8.lst2
-rw-r--r--src/devices/cpu/h8/h8make.py3
-rw-r--r--src/devices/cpu/m6502/ddeco16.lst2
-rw-r--r--src/devices/cpu/m6502/dm4510.lst2
-rw-r--r--src/devices/cpu/m6502/dm6502.lst2
-rw-r--r--src/devices/cpu/m6502/dm6509.lst2
-rw-r--r--src/devices/cpu/m6502/dm6510.lst2
-rw-r--r--src/devices/cpu/m6502/dm65c02.lst2
-rw-r--r--src/devices/cpu/m6502/dm65ce02.lst2
-rw-r--r--src/devices/cpu/m6502/dm740.lst2
-rw-r--r--src/devices/cpu/m6502/dn2a03.lst2
-rw-r--r--src/devices/cpu/m6502/dr65c02.lst2
-rwxr-xr-xsrc/devices/cpu/m6502/m6502make.py2
-rw-r--r--src/devices/cpu/m6502/odeco16.lst2
-rw-r--r--src/devices/cpu/m6502/om4510.lst2
-rw-r--r--src/devices/cpu/m6502/om6502.lst2
-rw-r--r--src/devices/cpu/m6502/om6509.lst2
-rw-r--r--src/devices/cpu/m6502/om6510.lst2
-rw-r--r--src/devices/cpu/m6502/om65c02.lst2
-rw-r--r--src/devices/cpu/m6502/om65ce02.lst2
-rw-r--r--src/devices/cpu/m6502/om740.lst2
-rw-r--r--src/devices/cpu/m6502/on2a03.lst2
-rw-r--r--src/devices/cpu/m6800/6800ops.inc3
-rw-r--r--src/devices/cpu/m6800/6800tbl.inc3
-rw-r--r--src/devices/cpu/m6805/6805ops.inc3
-rw-r--r--src/devices/cpu/m6809/base6x09.ops2
-rw-r--r--src/devices/cpu/m6809/hd6309.ops2
-rw-r--r--src/devices/cpu/m6809/konami.ops2
-rw-r--r--src/devices/cpu/m6809/m6809.ops2
-rw-r--r--src/devices/cpu/m6809/m6809make.py2
-rw-r--r--src/devices/cpu/mcs51/mcs51ops.inc2
-rw-r--r--src/devices/cpu/mcs96/mcs96make.py2
-rw-r--r--src/devices/cpu/mcs96/mcs96ops.lst2
-rw-r--r--src/devices/cpu/tms0980/tms0980.cpp3
-rw-r--r--src/devices/cpu/tms0980/tms0980d.cpp72
-rwxr-xr-xsrc/devices/cpu/tms57002/tmsmake.py2
-rw-r--r--src/devices/machine/ram.cpp2
-rw-r--r--src/devices/machine/ram.h2
-rw-r--r--src/devices/machine/s3c24xx.inc2
-rw-r--r--src/devices/sound/315-5641.cpp2
-rw-r--r--src/devices/sound/315-5641.h2
-rw-r--r--src/devices/video/epic12in.inc2
-rw-r--r--src/devices/video/epic12pixel.inc2
-rw-r--r--src/devices/video/voodoo_rast.inc3
-rw-r--r--src/emu/layout/LICENSE116
-rw-r--r--src/emu/layout/README.md6
-rw-r--r--src/emu/luaengine.cpp18
-rw-r--r--src/emu/mame.cpp2
-rw-r--r--src/emu/ui/custui.cpp8
-rw-r--r--src/emu/ui/dirmenu.cpp12
-rw-r--r--src/emu/ui/menu.cpp23
-rw-r--r--src/emu/ui/menu.h9
-rw-r--r--src/emu/ui/optsmenu.cpp8
-rw-r--r--src/emu/ui/selgame.cpp20
-rw-r--r--src/emu/ui/selsoft.cpp4
-rw-r--r--src/emu/validity.cpp24
-rw-r--r--src/ldplayer/layout/LICENSE116
-rw-r--r--src/ldplayer/layout/README.md6
-rw-r--r--src/lib/formats/atom_dsk.cpp2
-rw-r--r--src/lib/formats/atom_dsk.h2
-rw-r--r--src/lib/netlist/macro/nlm_cd4xxx.cpp3
-rw-r--r--src/lib/netlist/macro/nlm_cd4xxx.h2
-rw-r--r--src/lib/netlist/macro/nlm_opamp.cpp3
-rw-r--r--src/lib/netlist/macro/nlm_opamp.h2
-rw-r--r--src/lib/netlist/macro/nlm_other.cpp3
-rw-r--r--src/lib/netlist/macro/nlm_other.h2
-rw-r--r--src/lib/netlist/macro/nlm_ttl74xx.cpp3
-rw-r--r--src/lib/netlist/macro/nlm_ttl74xx.h2
-rw-r--r--src/lib/netlist/prg/nlwav.cpp2
-rw-r--r--src/lib/util/strformat.h47
-rw-r--r--src/mame/audio/flower.cpp337
-rw-r--r--src/mame/audio/nl_kidniki.inc3
-rw-r--r--src/mame/audio/segam1audio.cpp5
-rw-r--r--src/mame/audio/segam1audio.h2
-rw-r--r--src/mame/drivers/aerofgt.cpp21
-rw-r--r--src/mame/drivers/amstr_pc.cpp123
-rw-r--r--src/mame/drivers/argox.cpp2
-rw-r--r--src/mame/drivers/asst128.cpp59
-rw-r--r--src/mame/drivers/badlands.cpp17
-rw-r--r--src/mame/drivers/bking.cpp4
-rw-r--r--src/mame/drivers/canon_s80.cpp2
-rw-r--r--src/mame/drivers/carjmbre.cpp218
-rw-r--r--src/mame/drivers/dai3wksi.cpp2
-rw-r--r--src/mame/drivers/dvk_kcgd.cpp2
-rw-r--r--src/mame/drivers/ec184x.cpp145
-rw-r--r--src/mame/drivers/europc.cpp25
-rw-r--r--src/mame/drivers/flower.cpp218
-rw-r--r--src/mame/drivers/galastrm.cpp2
-rw-r--r--src/mame/drivers/genpc.cpp186
-rw-r--r--src/mame/drivers/glasgow.cpp90
-rw-r--r--src/mame/drivers/hh_cop400.cpp99
-rw-r--r--src/mame/drivers/hh_hmcs40.cpp22
-rw-r--r--src/mame/drivers/hh_tms1k.cpp68
-rw-r--r--src/mame/drivers/hh_ucom4.cpp52
-rw-r--r--src/mame/drivers/ibmpc.cpp105
-rw-r--r--src/mame/drivers/ibmpcjr.cpp40
-rw-r--r--src/mame/drivers/iskr103x.cpp65
-rw-r--r--src/mame/drivers/lg-dvd.cpp2
-rw-r--r--src/mame/drivers/m24.cpp12
-rw-r--r--src/mame/drivers/marinedt.cpp668
-rw-r--r--src/mame/drivers/marywu.cpp2
-rw-r--r--src/mame/drivers/mbdtower.cpp2
-rw-r--r--src/mame/drivers/mc1502.cpp69
-rw-r--r--src/mame/drivers/mephisto.cpp50
-rw-r--r--src/mame/drivers/metro.cpp2
-rw-r--r--src/mame/drivers/mmodular.cpp157
-rw-r--r--src/mame/drivers/mt735.cpp2
-rw-r--r--src/mame/drivers/notetaker.cpp48
-rw-r--r--src/mame/drivers/pasogo.cpp8
-rw-r--r--src/mame/drivers/pc.cpp183
-rw-r--r--src/mame/drivers/peplus.cpp5
-rw-r--r--src/mame/drivers/poisk1.cpp398
-rw-r--r--src/mame/drivers/popper.cpp360
-rw-r--r--src/mame/drivers/qdrmfgp.cpp6
-rw-r--r--src/mame/drivers/sansa_fuze.cpp3
-rw-r--r--src/mame/drivers/segapm.cpp2
-rw-r--r--src/mame/drivers/skylncr.cpp70
-rw-r--r--src/mame/drivers/sprcros2.cpp433
-rw-r--r--src/mame/drivers/supercon.cpp745
-rw-r--r--src/mame/drivers/suprnova.cpp126
-rw-r--r--src/mame/drivers/svi318.cpp241
-rw-r--r--src/mame/drivers/tandy1t.cpp309
-rw-r--r--src/mame/drivers/tecmo16.cpp6
-rw-r--r--src/mame/drivers/ticalc1x.cpp28
-rw-r--r--src/mame/drivers/tispeak.cpp23
-rw-r--r--src/mame/drivers/tispellb.cpp4
-rw-r--r--src/mame/drivers/toypop.cpp606
-rw-r--r--src/mame/drivers/trackfld.cpp47
-rw-r--r--src/mame/drivers/tsamurai.cpp4
-rw-r--r--src/mame/drivers/wacky_gator.cpp2
-rw-r--r--src/mame/drivers/yiear.cpp6
-rw-r--r--src/mame/drivers/zapcomputer.cpp2
-rw-r--r--src/mame/includes/aerofgt.h1
-rw-r--r--src/mame/includes/badlands.h5
-rw-r--r--src/mame/includes/bking.h4
-rw-r--r--src/mame/includes/carjmbre.h44
-rw-r--r--src/mame/includes/flower.h126
-rw-r--r--src/mame/includes/galastrm.h2
-rw-r--r--src/mame/includes/genpc.h37
-rw-r--r--src/mame/includes/mboard.h122
-rw-r--r--src/mame/includes/poisk1.h101
-rw-r--r--src/mame/includes/popper.h71
-rw-r--r--src/mame/includes/qdrmfgp.h4
-rw-r--r--src/mame/includes/sprcros2.h49
-rw-r--r--src/mame/includes/suprnova.h45
-rw-r--r--src/mame/includes/svi318.h159
-rw-r--r--src/mame/includes/tecmo16.h4
-rw-r--r--src/mame/includes/toypop.h92
-rw-r--r--src/mame/includes/yiear.h5
-rw-r--r--src/mame/layout/LICENSE116
-rw-r--r--src/mame/layout/README.md6
-rw-r--r--src/mame/layout/ctstein.lay99
-rw-r--r--src/mame/machine/genpc.cpp84
-rw-r--r--src/mame/machine/mboard.cpp568
-rw-r--r--src/mame/machine/ns10crypt.cpp2
-rw-r--r--src/mame/machine/ns10crypt.h2
-rw-r--r--src/mame/machine/pcshare.cpp6
-rw-r--r--src/mame/machine/svi318.cpp767
-rw-r--r--src/mame/mame.lst2
-rw-r--r--src/mame/mess.flt7
-rw-r--r--src/mame/video/bking.cpp4
-rw-r--r--src/mame/video/carjmbre.cpp156
-rw-r--r--src/mame/video/flower.cpp192
-rw-r--r--src/mame/video/galastrm.cpp2
-rw-r--r--src/mame/video/pc_t1t.cpp168
-rw-r--r--src/mame/video/pc_t1t.h14
-rw-r--r--src/mame/video/poisk1.cpp322
-rw-r--r--src/mame/video/popper.cpp245
-rw-r--r--src/mame/video/qdrmfgp.cpp4
-rw-r--r--src/mame/video/snk68_spr.h2
-rw-r--r--src/mame/video/sprcros2.cpp187
-rw-r--r--src/mame/video/suprnova.cpp53
-rw-r--r--src/mame/video/tecmo16.cpp4
-rw-r--r--src/mame/video/toypop.cpp275
-rw-r--r--src/mame/video/yiear.cpp5
-rw-r--r--src/osd/modules/input/input_sdl.cpp19
-rw-r--r--src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh3
-rw-r--r--src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh3
-rw-r--r--src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh3
-rw-r--r--src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh3
-rw-r--r--src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh3
-rw-r--r--src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh3
-rw-r--r--src/osd/modules/render/bgfx/statereader.cpp2
-rw-r--r--src/osd/modules/render/bgfx/statereader.h2
-rw-r--r--src/osd/modules/render/bgfx/writereader.cpp2
-rw-r--r--src/osd/modules/render/bgfx/writereader.h2
-rw-r--r--src/osd/modules/render/binpacker.h2
-rw-r--r--src/osd/modules/render/drawbgfx.h2
-rw-r--r--src/osd/modules/sound/xaudio2_sound.cpp7
-rw-r--r--src/osd/osdcore.cpp2
-rw-r--r--src/osd/sdl/aueffectutil.mm2
-rw-r--r--src/osd/sdl/keymaps/km-be.txt23
-rw-r--r--src/osd/sdl/keymaps/km-ch.txt14
-rw-r--r--src/osd/sdl/keymaps/km-de.txt26
-rw-r--r--src/osd/sdl/keymaps/km-fr-OSX.txt13
-rw-r--r--src/osd/sdl/keymaps/km-fr.txt23
-rw-r--r--src/osd/sdl/keymaps/km_it.txt12
-rw-r--r--src/osd/sdl/ledutil.sh3
-rw-r--r--src/osd/sdl/man/LICENSE116
-rw-r--r--src/osd/sdl/man/README.md5
-rw-r--r--src/osd/sdl/sdlmain.cpp7
-rw-r--r--src/osd/sdl/taputil.sh3
-rw-r--r--src/osd/sdl/window.cpp2
-rw-r--r--tests/LICENSE27
-rw-r--r--tests/README.md5
-rw-r--r--tests/lib/util/corestr.cpp3
-rw-r--r--tests/main.cpp3
477 files changed, 12732 insertions, 27483 deletions
diff --git a/.gitignore b/.gitignore
index a2f4aa1c861..f01c2c01e05 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,7 @@
!/makefile
!/mame.doxygen
!/*.md
+!/LICENSE
/.idea
regtests/chdman/temp
regtests/jedutil/output
diff --git a/3rdparty/README.md b/3rdparty/README.md
new file mode 100644
index 00000000000..4868144ee2c
--- /dev/null
+++ b/3rdparty/README.md
@@ -0,0 +1,55 @@
+# **3rdparty** #
+
+benchmark - [Apache License, Version 2.0](http://opensource.org/licenses/Apache-2.0) (used only for testing, not part of distribution)
+
+bgfx - [The BSD 2-Clause License](http://opensource.org/licenses/BSD-2-Clause)
+
+bx - [The BSD 2-Clause License](http://opensource.org/licenses/BSD-2-Clause)
+
+compat - Wine headers missing in MinGW [The GNU Lesser General Public License, version 2.1 (LGPL-2.1)](http://opensource.org/licenses/LGPL-2.1)
+
+**note that this one contain headers only and that real library/dll is dynamically loaded so use in commercial project is allowed, will be removed when becomes part of MinGW distribution**
+
+dxsdk - [DirectX SDK EULA](https://github.com/mamedev/mame/blob/master/3rdparty/dxsdk/Documentation/License%20Agreements/DirectX%20SDK%20EULA.txt)
+
+expat - [The MIT License (MIT)](http://opensource.org/licenses/MIT)
+
+genie - [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause)
+
+googletest - [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause)
+
+http-parser - [The MIT License (MIT)](http://opensource.org/licenses/MIT)
+
+libflac - [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause)
+
+libjpeg - [Custom BSD-like](https://github.com/numenta/nupic/blob/master/external/licenses/LICENSE.libjpeg-6b.txt)
+
+libuv - [Node License (BSD-like)](https://github.com/mamedev/mame/blob/master/3rdparty/libuv/LICENSE)
+
+lsqlite3 - [The MIT License (MIT)](http://opensource.org/licenses/MIT)
+
+lua - [The MIT License (MIT)](http://opensource.org/licenses/MIT)
+
+lua-zlib - [The MIT License (MIT)](http://opensource.org/licenses/MIT)
+
+luabridge - [The MIT License (MIT)](http://opensource.org/licenses/MIT)
+
+luafilesystem - [The MIT License (MIT)](http://opensource.org/licenses/MIT)
+
+lzma - [The GNU Lesser General Public License](http://opensource.org/licenses/LGPL-2.1)
+
+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)
+
+rapidjson - [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause)
+
+sdl2 - [zlib license](http://opensource.org/licenses/Zlib)
+
+softfloat - [U.C. Berkeley open-source license](https://github.com/mamedev/mame/blob/master/3rdparty/softfloat/README.txt) MIT compatible
+
+sqlite3 - Public Domain
+
+winpcap - [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause)
+
+zlib - [zlib license](http://opensource.org/licenses/Zlib)
diff --git a/3rdparty/compat/mingw/xaudio2.h b/3rdparty/compat/mingw/xaudio2.h
new file mode 100644
index 00000000000..15165a3ecdd
--- /dev/null
+++ b/3rdparty/compat/mingw/xaudio2.h
@@ -0,0 +1,6491 @@
+/*** Autogenerated by WIDL 1.6 from xaudio2.idl - Do not edit ***/
+
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 475
+#endif
+
+#include <rpc.h>
+#include <rpcndr.h>
+
+#ifndef COM_NO_WINDOWS_H
+#include <windows.h>
+#include <ole2.h>
+#endif
+
+#ifndef __widl_tab__
+#define __widl_tab__
+
+/* Forward declarations */
+
+#ifndef __XAudio20_FWD_DEFINED__
+#define __XAudio20_FWD_DEFINED__
+#ifdef __cplusplus
+typedef class XAudio20 XAudio20;
+#else
+typedef struct XAudio20 XAudio20;
+#endif /* defined __cplusplus */
+#endif /* defined __XAudio20_FWD_DEFINED__ */
+
+#ifndef __XAudio21_FWD_DEFINED__
+#define __XAudio21_FWD_DEFINED__
+#ifdef __cplusplus
+typedef class XAudio21 XAudio21;
+#else
+typedef struct XAudio21 XAudio21;
+#endif /* defined __cplusplus */
+#endif /* defined __XAudio21_FWD_DEFINED__ */
+
+#ifndef __XAudio22_FWD_DEFINED__
+#define __XAudio22_FWD_DEFINED__
+#ifdef __cplusplus
+typedef class XAudio22 XAudio22;
+#else
+typedef struct XAudio22 XAudio22;
+#endif /* defined __cplusplus */
+#endif /* defined __XAudio22_FWD_DEFINED__ */
+
+#ifndef __XAudio23_FWD_DEFINED__
+#define __XAudio23_FWD_DEFINED__
+#ifdef __cplusplus
+typedef class XAudio23 XAudio23;
+#else
+typedef struct XAudio23 XAudio23;
+#endif /* defined __cplusplus */
+#endif /* defined __XAudio23_FWD_DEFINED__ */
+
+#ifndef __XAudio24_FWD_DEFINED__
+#define __XAudio24_FWD_DEFINED__
+#ifdef __cplusplus
+typedef class XAudio24 XAudio24;
+#else
+typedef struct XAudio24 XAudio24;
+#endif /* defined __cplusplus */
+#endif /* defined __XAudio24_FWD_DEFINED__ */
+
+#ifndef __XAudio25_FWD_DEFINED__
+#define __XAudio25_FWD_DEFINED__
+#ifdef __cplusplus
+typedef class XAudio25 XAudio25;
+#else
+typedef struct XAudio25 XAudio25;
+#endif /* defined __cplusplus */
+#endif /* defined __XAudio25_FWD_DEFINED__ */
+
+#ifndef __XAudio26_FWD_DEFINED__
+#define __XAudio26_FWD_DEFINED__
+#ifdef __cplusplus
+typedef class XAudio26 XAudio26;
+#else
+typedef struct XAudio26 XAudio26;
+#endif /* defined __cplusplus */
+#endif /* defined __XAudio26_FWD_DEFINED__ */
+
+#ifndef __XAudio27_FWD_DEFINED__
+#define __XAudio27_FWD_DEFINED__
+#ifdef __cplusplus
+typedef class XAudio27 XAudio27;
+#else
+typedef struct XAudio27 XAudio27;
+#endif /* defined __cplusplus */
+#endif /* defined __XAudio27_FWD_DEFINED__ */
+
+#ifndef __XAudio2Debug_FWD_DEFINED__
+#define __XAudio2Debug_FWD_DEFINED__
+#ifdef __cplusplus
+typedef class XAudio2Debug XAudio2Debug;
+#else
+typedef struct XAudio2Debug XAudio2Debug;
+#endif /* defined __cplusplus */
+#endif /* defined __XAudio2Debug_FWD_DEFINED__ */
+
+#ifndef __IXAudio2EngineCallback_FWD_DEFINED__
+#define __IXAudio2EngineCallback_FWD_DEFINED__
+typedef interface IXAudio2EngineCallback IXAudio2EngineCallback;
+#endif
+
+#ifndef __IXAudio20Voice_FWD_DEFINED__
+#define __IXAudio20Voice_FWD_DEFINED__
+typedef interface IXAudio20Voice IXAudio20Voice;
+#endif
+
+#ifndef __IXAudio23Voice_FWD_DEFINED__
+#define __IXAudio23Voice_FWD_DEFINED__
+typedef interface IXAudio23Voice IXAudio23Voice;
+#endif
+
+#ifndef __IXAudio2Voice_FWD_DEFINED__
+#define __IXAudio2Voice_FWD_DEFINED__
+typedef interface IXAudio2Voice IXAudio2Voice;
+#endif
+
+#ifndef __IXAudio20SourceVoice_FWD_DEFINED__
+#define __IXAudio20SourceVoice_FWD_DEFINED__
+typedef interface IXAudio20SourceVoice IXAudio20SourceVoice;
+#endif
+
+#ifndef __IXAudio23SourceVoice_FWD_DEFINED__
+#define __IXAudio23SourceVoice_FWD_DEFINED__
+typedef interface IXAudio23SourceVoice IXAudio23SourceVoice;
+#endif
+
+#ifndef __IXAudio27SourceVoice_FWD_DEFINED__
+#define __IXAudio27SourceVoice_FWD_DEFINED__
+typedef interface IXAudio27SourceVoice IXAudio27SourceVoice;
+#endif
+
+#ifndef __IXAudio2SourceVoice_FWD_DEFINED__
+#define __IXAudio2SourceVoice_FWD_DEFINED__
+typedef interface IXAudio2SourceVoice IXAudio2SourceVoice;
+#endif
+
+#ifndef __IXAudio20SubmixVoice_FWD_DEFINED__
+#define __IXAudio20SubmixVoice_FWD_DEFINED__
+typedef interface IXAudio20SubmixVoice IXAudio20SubmixVoice;
+#endif
+
+#ifndef __IXAudio23SubmixVoice_FWD_DEFINED__
+#define __IXAudio23SubmixVoice_FWD_DEFINED__
+typedef interface IXAudio23SubmixVoice IXAudio23SubmixVoice;
+#endif
+
+#ifndef __IXAudio2SubmixVoice_FWD_DEFINED__
+#define __IXAudio2SubmixVoice_FWD_DEFINED__
+typedef interface IXAudio2SubmixVoice IXAudio2SubmixVoice;
+#endif
+
+#ifndef __IXAudio20MasteringVoice_FWD_DEFINED__
+#define __IXAudio20MasteringVoice_FWD_DEFINED__
+typedef interface IXAudio20MasteringVoice IXAudio20MasteringVoice;
+#endif
+
+#ifndef __IXAudio23MasteringVoice_FWD_DEFINED__
+#define __IXAudio23MasteringVoice_FWD_DEFINED__
+typedef interface IXAudio23MasteringVoice IXAudio23MasteringVoice;
+#endif
+
+#ifndef __IXAudio2MasteringVoice_FWD_DEFINED__
+#define __IXAudio2MasteringVoice_FWD_DEFINED__
+typedef interface IXAudio2MasteringVoice IXAudio2MasteringVoice;
+#endif
+
+#ifndef __IXAudio20VoiceCallback_FWD_DEFINED__
+#define __IXAudio20VoiceCallback_FWD_DEFINED__
+typedef interface IXAudio20VoiceCallback IXAudio20VoiceCallback;
+#endif
+
+#ifndef __IXAudio2VoiceCallback_FWD_DEFINED__
+#define __IXAudio2VoiceCallback_FWD_DEFINED__
+typedef interface IXAudio2VoiceCallback IXAudio2VoiceCallback;
+#endif
+
+#ifndef __IXAudio20_FWD_DEFINED__
+#define __IXAudio20_FWD_DEFINED__
+typedef interface IXAudio20 IXAudio20;
+#endif
+
+#ifndef __IXAudio22_FWD_DEFINED__
+#define __IXAudio22_FWD_DEFINED__
+typedef interface IXAudio22 IXAudio22;
+#endif
+
+#ifndef __IXAudio27_FWD_DEFINED__
+#define __IXAudio27_FWD_DEFINED__
+typedef interface IXAudio27 IXAudio27;
+#endif
+
+#ifndef __IXAudio2_FWD_DEFINED__
+#define __IXAudio2_FWD_DEFINED__
+typedef interface IXAudio2 IXAudio2;
+#endif
+
+/* Headers for imported files */
+
+#include <unknwn.h>
+#include <mmdeviceapi.h>
+#include <audiosessiontypes.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <pshpack1.h>
+/*****************************************************************************
+ * XAudio20 coclass
+ */
+
+DEFINE_GUID(CLSID_XAudio20, 0xfac23f48, 0x31f5, 0x45a8, 0xb4,0x9b, 0x52,0x25,0xd6,0x14,0x01,0xaa);
+
+#ifdef __cplusplus
+class DECLSPEC_UUID("fac23f48-31f5-45a8-b49b-5225d61401aa") XAudio20;
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(XAudio20, 0xfac23f48, 0x31f5, 0x45a8, 0xb4,0x9b, 0x52,0x25,0xd6,0x14,0x01,0xaa)
+#endif
+#endif
+
+/*****************************************************************************
+ * XAudio21 coclass
+ */
+
+DEFINE_GUID(CLSID_XAudio21, 0xe21a7345, 0xeb21, 0x468e, 0xbe,0x50, 0x80,0x4d,0xb9,0x7c,0xf7,0x08);
+
+#ifdef __cplusplus
+class DECLSPEC_UUID("e21a7345-eb21-468e-be50-804db97cf708") XAudio21;
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(XAudio21, 0xe21a7345, 0xeb21, 0x468e, 0xbe,0x50, 0x80,0x4d,0xb9,0x7c,0xf7,0x08)
+#endif
+#endif
+
+/*****************************************************************************
+ * XAudio22 coclass
+ */
+
+DEFINE_GUID(CLSID_XAudio22, 0xb802058a, 0x464a, 0x42db, 0xbc,0x10, 0xb6,0x50,0xd6,0xf2,0x58,0x6a);
+
+#ifdef __cplusplus
+class DECLSPEC_UUID("b802058a-464a-42db-bc10-b650d6f2586a") XAudio22;
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(XAudio22, 0xb802058a, 0x464a, 0x42db, 0xbc,0x10, 0xb6,0x50,0xd6,0xf2,0x58,0x6a)
+#endif
+#endif
+
+/*****************************************************************************
+ * XAudio23 coclass
+ */
+
+DEFINE_GUID(CLSID_XAudio23, 0x4c5e637a, 0x16c7, 0x4de3, 0x9c,0x46, 0x5e,0xd2,0x21,0x81,0x96,0x2d);
+
+#ifdef __cplusplus
+class DECLSPEC_UUID("4c5e637a-16c7-4de3-9c46-5ed22181962d") XAudio23;
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(XAudio23, 0x4c5e637a, 0x16c7, 0x4de3, 0x9c,0x46, 0x5e,0xd2,0x21,0x81,0x96,0x2d)
+#endif
+#endif
+
+/*****************************************************************************
+ * XAudio24 coclass
+ */
+
+DEFINE_GUID(CLSID_XAudio24, 0x03219e78, 0x5bc3, 0x44d1, 0xb9,0x2e, 0xf6,0x3d,0x89,0xcc,0x65,0x26);
+
+#ifdef __cplusplus
+class DECLSPEC_UUID("03219e78-5bc3-44d1-b92e-f63d89cc6526") XAudio24;
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(XAudio24, 0x03219e78, 0x5bc3, 0x44d1, 0xb9,0x2e, 0xf6,0x3d,0x89,0xcc,0x65,0x26)
+#endif
+#endif
+
+/*****************************************************************************
+ * XAudio25 coclass
+ */
+
+DEFINE_GUID(CLSID_XAudio25, 0x4c9b6dde, 0x6809, 0x46e6, 0xa2,0x78, 0x9b,0x6a,0x97,0x58,0x86,0x70);
+
+#ifdef __cplusplus
+class DECLSPEC_UUID("4c9b6dde-6809-46e6-a278-9b6a97588670") XAudio25;
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(XAudio25, 0x4c9b6dde, 0x6809, 0x46e6, 0xa2,0x78, 0x9b,0x6a,0x97,0x58,0x86,0x70)
+#endif
+#endif
+
+/*****************************************************************************
+ * XAudio26 coclass
+ */
+
+DEFINE_GUID(CLSID_XAudio26, 0x3eda9b49, 0x2085, 0x498b, 0x9b,0xb2, 0x39,0xa6,0x77,0x84,0x93,0xde);
+
+#ifdef __cplusplus
+class DECLSPEC_UUID("3eda9b49-2085-498b-9bb2-39a6778493de") XAudio26;
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(XAudio26, 0x3eda9b49, 0x2085, 0x498b, 0x9b,0xb2, 0x39,0xa6,0x77,0x84,0x93,0xde)
+#endif
+#endif
+
+/*****************************************************************************
+ * XAudio27 coclass
+ */
+
+DEFINE_GUID(CLSID_XAudio27, 0x5a508685, 0xa254, 0x4fba, 0x9b,0x82, 0x9a,0x24,0xb0,0x03,0x06,0xaf);
+
+#ifdef __cplusplus
+class DECLSPEC_UUID("5a508685-a254-4fba-9b82-9a24b00306af") XAudio27;
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(XAudio27, 0x5a508685, 0xa254, 0x4fba, 0x9b,0x82, 0x9a,0x24,0xb0,0x03,0x06,0xaf)
+#endif
+#endif
+
+/*****************************************************************************
+ * XAudio2Debug coclass
+ */
+
+DEFINE_GUID(CLSID_XAudio2Debug, 0xdb05ea35, 0x0329, 0x4d4b, 0xa5,0x3a, 0x6d,0xea,0xd0,0x3d,0x38,0x52);
+
+#ifdef __cplusplus
+class DECLSPEC_UUID("db05ea35-0329-4d4b-a53a-6dead03d3852") XAudio2Debug;
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(XAudio2Debug, 0xdb05ea35, 0x0329, 0x4d4b, 0xa5,0x3a, 0x6d,0xea,0xd0,0x3d,0x38,0x52)
+#endif
+#endif
+
+#if 0
+typedef struct WAVEFORMATEX {
+ WORD wFormatTag;
+ WORD nChannels;
+ DWORD nSamplesPerSec;
+ DWORD nAvgBytesPerSec;
+ WORD nBlockAlign;
+ WORD wBitsPerSample;
+ WORD cbSize;
+} WAVEFORMATEX;
+typedef struct __WIDL_xaudio2_generated_name_00000013 {
+ WAVEFORMATEX Format;
+ union {
+ WORD wValidBitsPerSample;
+ WORD wSamplesPerBlock;
+ WORD wReserved;
+ } Samples;
+ DWORD dwChannelMask;
+ GUID SubFormat;
+} WAVEFORMATEXTENSIBLE;
+typedef struct __WIDL_xaudio2_generated_name_00000013 *PWAVEFORMATEXTENSIBLE;
+#else
+#include <mmreg.h>
+#endif
+#ifndef __IXAudio2Voice_FWD_DEFINED__
+#define __IXAudio2Voice_FWD_DEFINED__
+typedef interface IXAudio2Voice IXAudio2Voice;
+#endif
+
+typedef enum XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER {
+ Processor1 = 0x1,
+ Processor2 = 0x2,
+ Processor3 = 0x4,
+ Processor4 = 0x8,
+ Processor5 = 0x10,
+ Processor6 = 0x20,
+ Processor7 = 0x40,
+ Processor8 = 0x80,
+ Processor9 = 0x100,
+ Processor10 = 0x200,
+ Processor11 = 0x400,
+ Processor12 = 0x800,
+ Processor13 = 0x1000,
+ Processor14 = 0x2000,
+ Processor15 = 0x4000,
+ Processor16 = 0x8000,
+ Processor17 = 0x10000,
+ Processor18 = 0x20000,
+ Processor19 = 0x40000,
+ Processor20 = 0x80000,
+ Processor21 = 0x100000,
+ Processor22 = 0x200000,
+ Processor23 = 0x400000,
+ Processor24 = 0x800000,
+ Processor25 = 0x1000000,
+ Processor26 = 0x2000000,
+ Processor27 = 0x4000000,
+ Processor28 = 0x8000000,
+ Processor29 = 0x10000000,
+ Processor30 = 0x20000000,
+ Processor31 = 0x40000000,
+ Processor32 = 0x80000000,
+ XAUDIO2_ANY_PROCESSOR = 0xffffffff,
+ XAUDIO2_DEFAULT_PROCESSOR = XAUDIO2_ANY_PROCESSOR
+} XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER;
+typedef enum XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER XAUDIO2_PROCESSOR;
+typedef struct XAUDIO2_PERFORMANCE_DATA {
+ UINT64 AudioCyclesSinceLastQuery;
+ UINT64 TotalCyclesSinceLastQuery;
+ UINT32 MinimumCyclesPerQuantum;
+ UINT32 MaximumCyclesPerQuantum;
+ UINT32 MemoryUsageInBytes;
+ UINT32 CurrentLatencyInSamples;
+ UINT32 GlitchesSinceEngineStarted;
+ UINT32 ActiveSourceVoiceCount;
+ UINT32 TotalSourceVoiceCount;
+ UINT32 ActiveSubmixVoiceCount;
+ UINT32 ActiveResamplerCount;
+ UINT32 ActiveMatrixMixCount;
+ UINT32 ActiveXmaSourceVoices;
+ UINT32 ActiveXmaStreams;
+} XAUDIO2_PERFORMANCE_DATA;
+typedef struct XAUDIO22_PERFORMANCE_DATA {
+ UINT64 AudioCyclesSinceLastQuery;
+ UINT64 TotalCyclesSinceLastQuery;
+ UINT32 MinimumCyclesPerQuantum;
+ UINT32 MaximumCyclesPerQuantum;
+ UINT32 MemoryUsageInBytes;
+ UINT32 CurrentLatencyInSamples;
+ UINT32 GlitchesSinceEngineStarted;
+ UINT32 ActiveSourceVoiceCount;
+ UINT32 TotalSourceVoiceCount;
+ UINT32 ActiveSubmixVoiceCount;
+ UINT32 TotalSubmixVoiceCount;
+ UINT32 ActiveXmaSourceVoices;
+ UINT32 ActiveXmaStreams;
+} XAUDIO22_PERFORMANCE_DATA;
+typedef struct XAUDIO20_PERFORMANCE_DATA {
+ UINT64 AudioCyclesSinceLastQuery;
+ UINT64 TotalCyclesSinceLastQuery;
+ UINT32 MinimumCyclesPerQuantum;
+ UINT32 MaximumCyclesPerQuantum;
+ UINT32 MemoryUsageInBytes;
+ UINT32 CurrentLatencyInSamples;
+ UINT32 GlitchesSinceLastQuery;
+ UINT32 ActiveSourceVoiceCount;
+ UINT32 TotalSourceVoiceCount;
+ UINT32 ActiveSubmixVoiceCount;
+ UINT32 TotalSubmixVoiceCount;
+ UINT32 ActiveXmaSourceVoices;
+ UINT32 ActiveXmaStreams;
+} XAUDIO20_PERFORMANCE_DATA;
+typedef enum XAUDIO2_DEVICE_ROLE {
+ NotDefaultDevice = 0x0,
+ DefaultConsoleDevice = 0x1,
+ DefaultMultimediaDevice = 0x2,
+ DefaultCommunicationsDevice = 0x4,
+ DefaultGameDevice = 0x8,
+ GlobalDefaultDevice = 0xf,
+ InvalidDeviceRole = ~GlobalDefaultDevice
+} XAUDIO2_DEVICE_ROLE;
+typedef struct XAUDIO2_DEVICE_DETAILS {
+ WCHAR DeviceID[256];
+ WCHAR DisplayName[256];
+ XAUDIO2_DEVICE_ROLE Role;
+ WAVEFORMATEXTENSIBLE OutputFormat;
+} XAUDIO2_DEVICE_DETAILS;
+typedef struct XAUDIO2_VOICE_DETAILS {
+ UINT32 CreationFlags;
+ UINT32 InputChannels;
+ UINT32 InputSampleRate;
+} XAUDIO2_VOICE_DETAILS;
+typedef struct XAUDIO2_SEND_DESCRIPTOR {
+ UINT32 Flags;
+ IXAudio2Voice *pOutputVoice;
+} XAUDIO2_SEND_DESCRIPTOR;
+typedef struct XAUDIO23_VOICE_SENDS {
+ UINT32 OutputCount;
+ IXAudio2Voice **pOutputVoices;
+} XAUDIO23_VOICE_SENDS;
+typedef struct XAUDIO2_VOICE_SENDS {
+ UINT32 SendCount;
+ XAUDIO2_SEND_DESCRIPTOR *pSends;
+} XAUDIO2_VOICE_SENDS;
+typedef struct XAUDIO2_EFFECT_DESCRIPTOR {
+ IUnknown *pEffect;
+ BOOL InitialState;
+ UINT32 OutputChannels;
+} XAUDIO2_EFFECT_DESCRIPTOR;
+typedef struct XAUDIO2_EFFECT_CHAIN {
+ UINT32 EffectCount;
+ XAUDIO2_EFFECT_DESCRIPTOR *pEffectDescriptors;
+} XAUDIO2_EFFECT_CHAIN;
+#define XAUDIO2_MAX_BUFFER_BYTES (0x80000000)
+
+#define XAUDIO2_MAX_QUEUED_BUFFERS (64)
+
+#define XAUDIO2_MAX_BUFFERS_SYSTEM (2)
+
+#define XAUDIO2_MAX_AUDIO_CHANNELS (64)
+
+#define XAUDIO2_MIN_SAMPLE_RATE (1000)
+
+#define XAUDIO2_MAX_SAMPLE_RATE (200000)
+
+#define XAUDIO2_MAX_VOLUME_LEVEL (16777216.0000000)
+
+#define XAUDIO2_MIN_FREQ_RATIO (1 / 1024.00000000000)
+
+#define XAUDIO2_MAX_FREQ_RATIO (1024.00000000000)
+
+#define XAUDIO2_DEFAULT_FREQ_RATIO (2.00000000000000)
+
+#define XAUDIO2_MAX_FILTER_ONEOVERQ (1.50000000000000)
+
+#define XAUDIO2_MAX_FILTER_FREQUENCY (1.00000000000000)
+
+#define XAUDIO2_MAX_LOOP_COUNT (254)
+
+#define XAUDIO20_MAX_LOOP_COUNT (0x100000)
+
+#define XAUDIO2_COMMIT_NOW (0)
+
+#define XAUDIO2_COMMIT_ALL (0)
+
+#define XAUDIO2_INVALID_OPSET (0xffffffff)
+
+#define XAUDIO2_NO_LOOP_REGION (0)
+
+#define XAUDIO2_LOOP_INFINITE (255)
+
+#define XAUDIO20_LOOP_INFINITE ((UINT)-1)
+
+#define XAUDIO2_DEFAULT_CHANNELS (0)
+
+#define XAUDIO2_DEFAULT_SAMPLERATE (0)
+
+/*****************************************************************************
+ * IXAudio2EngineCallback interface
+ */
+#ifndef __IXAudio2EngineCallback_INTERFACE_DEFINED__
+#define __IXAudio2EngineCallback_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio2EngineCallback
+{
+ BEGIN_INTERFACE
+
+ virtual void STDMETHODCALLTYPE OnProcessingPassStart(
+ ) = 0;
+
+ virtual void STDMETHODCALLTYPE OnProcessingPassEnd(
+ ) = 0;
+
+ virtual void STDMETHODCALLTYPE OnCriticalError(
+ HRESULT Error) = 0;
+
+ END_INTERFACE
+};
+#else
+typedef struct IXAudio2EngineCallbackVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio2EngineCallback methods ***/
+ void (STDMETHODCALLTYPE *OnProcessingPassStart)(
+ IXAudio2EngineCallback* This);
+
+ void (STDMETHODCALLTYPE *OnProcessingPassEnd)(
+ IXAudio2EngineCallback* This);
+
+ void (STDMETHODCALLTYPE *OnCriticalError)(
+ IXAudio2EngineCallback* This,
+ HRESULT Error);
+
+ END_INTERFACE
+} IXAudio2EngineCallbackVtbl;
+interface IXAudio2EngineCallback {
+ CONST_VTBL IXAudio2EngineCallbackVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio2EngineCallback methods ***/
+#define IXAudio2EngineCallback_OnProcessingPassStart(This) (This)->lpVtbl->OnProcessingPassStart(This)
+#define IXAudio2EngineCallback_OnProcessingPassEnd(This) (This)->lpVtbl->OnProcessingPassEnd(This)
+#define IXAudio2EngineCallback_OnCriticalError(This,Error) (This)->lpVtbl->OnCriticalError(This,Error)
+#else
+/*** IXAudio2EngineCallback methods ***/
+static FORCEINLINE void IXAudio2EngineCallback_OnProcessingPassStart(IXAudio2EngineCallback* This) {
+ This->lpVtbl->OnProcessingPassStart(This);
+}
+static FORCEINLINE void IXAudio2EngineCallback_OnProcessingPassEnd(IXAudio2EngineCallback* This) {
+ This->lpVtbl->OnProcessingPassEnd(This);
+}
+static FORCEINLINE void IXAudio2EngineCallback_OnCriticalError(IXAudio2EngineCallback* This,HRESULT Error) {
+ This->lpVtbl->OnCriticalError(This,Error);
+}
+#endif
+#endif
+
+#endif
+
+void STDMETHODCALLTYPE IXAudio2EngineCallback_OnProcessingPassStart_Proxy(
+ IXAudio2EngineCallback* This);
+void __RPC_STUB IXAudio2EngineCallback_OnProcessingPassStart_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2EngineCallback_OnProcessingPassEnd_Proxy(
+ IXAudio2EngineCallback* This);
+void __RPC_STUB IXAudio2EngineCallback_OnProcessingPassEnd_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2EngineCallback_OnCriticalError_Proxy(
+ IXAudio2EngineCallback* This,
+ HRESULT Error);
+void __RPC_STUB IXAudio2EngineCallback_OnCriticalError_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio2EngineCallback_INTERFACE_DEFINED__ */
+
+typedef enum XAUDIO2_FILTER_TYPE {
+ LowPassFilter = 0,
+ BandPassFilter = 1,
+ HighPassFilter = 2,
+ NotchFilter = 3
+} XAUDIO2_FILTER_TYPE;
+typedef struct XAUDIO2_FILTER_PARAMETERS {
+ XAUDIO2_FILTER_TYPE Type;
+ float Frequency;
+ float OneOverQ;
+} XAUDIO2_FILTER_PARAMETERS;
+/*****************************************************************************
+ * IXAudio20Voice interface
+ */
+#ifndef __IXAudio20Voice_INTERFACE_DEFINED__
+#define __IXAudio20Voice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio20Voice
+{
+ BEGIN_INTERFACE
+
+ virtual void STDMETHODCALLTYPE GetVoiceDetails(
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetOutputVoices(
+ const XAUDIO23_VOICE_SENDS *pSendList) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetEffectChain(
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE EnableEffect(
+ UINT32 EffectIndex,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE DisableEffect(
+ UINT32 EffectIndex,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetEffectState(
+ UINT32 EffectIndex,
+ BOOL *pEnabled) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetEffectParameters(
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetEffectParameters(
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetFilterParameters(
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetFilterParameters(
+ XAUDIO2_FILTER_PARAMETERS *pParameters) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetVolume(
+ float Volume,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetVolume(
+ float *pVolume) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetChannelVolumes(
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetChannelVolumes(
+ UINT32 Channels,
+ float *pVolumes) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetOutputMatrix(
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetOutputMatrix(
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix) = 0;
+
+ virtual void STDMETHODCALLTYPE DestroyVoice(
+ ) = 0;
+
+ END_INTERFACE
+};
+#else
+typedef struct IXAudio20VoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio20Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio20Voice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio20Voice* This,
+ const XAUDIO23_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio20Voice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio20Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio20Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio20Voice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio20Voice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio20Voice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio20Voice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio20Voice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio20Voice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio20Voice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio20Voice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio20Voice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio20Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio20Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio20Voice* This);
+
+ END_INTERFACE
+} IXAudio20VoiceVtbl;
+interface IXAudio20Voice {
+ CONST_VTBL IXAudio20VoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio20Voice methods ***/
+#define IXAudio20Voice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio20Voice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio20Voice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio20Voice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio20Voice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio20Voice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio20Voice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio20Voice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio20Voice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio20Voice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio20Voice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio20Voice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio20Voice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio20Voice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio20Voice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio20Voice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio20Voice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+#else
+/*** IXAudio20Voice methods ***/
+static FORCEINLINE void IXAudio20Voice_GetVoiceDetails(IXAudio20Voice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio20Voice_SetOutputVoices(IXAudio20Voice* This,const XAUDIO23_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio20Voice_SetEffectChain(IXAudio20Voice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio20Voice_EnableEffect(IXAudio20Voice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20Voice_DisableEffect(IXAudio20Voice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio20Voice_GetEffectState(IXAudio20Voice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio20Voice_SetEffectParameters(IXAudio20Voice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20Voice_GetEffectParameters(IXAudio20Voice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio20Voice_SetFilterParameters(IXAudio20Voice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio20Voice_GetFilterParameters(IXAudio20Voice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio20Voice_SetVolume(IXAudio20Voice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio20Voice_GetVolume(IXAudio20Voice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio20Voice_SetChannelVolumes(IXAudio20Voice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio20Voice_GetChannelVolumes(IXAudio20Voice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio20Voice_SetOutputMatrix(IXAudio20Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20Voice_GetOutputMatrix(IXAudio20Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ return This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio20Voice_DestroyVoice(IXAudio20Voice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+#endif
+#endif
+
+#endif
+
+void STDMETHODCALLTYPE IXAudio20Voice_GetVoiceDetails_Proxy(
+ IXAudio20Voice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+void __RPC_STUB IXAudio20Voice_GetVoiceDetails_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetOutputVoices_Proxy(
+ IXAudio20Voice* This,
+ const XAUDIO23_VOICE_SENDS *pSendList);
+void __RPC_STUB IXAudio20Voice_SetOutputVoices_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetEffectChain_Proxy(
+ IXAudio20Voice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio20Voice_SetEffectChain_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20Voice_EnableEffect_Proxy(
+ IXAudio20Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20Voice_EnableEffect_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20Voice_DisableEffect_Proxy(
+ IXAudio20Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20Voice_DisableEffect_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20Voice_GetEffectState_Proxy(
+ IXAudio20Voice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+void __RPC_STUB IXAudio20Voice_GetEffectState_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetEffectParameters_Proxy(
+ IXAudio20Voice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20Voice_SetEffectParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20Voice_GetEffectParameters_Proxy(
+ IXAudio20Voice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+void __RPC_STUB IXAudio20Voice_GetEffectParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetFilterParameters_Proxy(
+ IXAudio20Voice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20Voice_SetFilterParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20Voice_GetFilterParameters_Proxy(
+ IXAudio20Voice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+void __RPC_STUB IXAudio20Voice_GetFilterParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetVolume_Proxy(
+ IXAudio20Voice* This,
+ float Volume,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20Voice_SetVolume_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20Voice_GetVolume_Proxy(
+ IXAudio20Voice* This,
+ float *pVolume);
+void __RPC_STUB IXAudio20Voice_GetVolume_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetChannelVolumes_Proxy(
+ IXAudio20Voice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20Voice_SetChannelVolumes_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20Voice_GetChannelVolumes_Proxy(
+ IXAudio20Voice* This,
+ UINT32 Channels,
+ float *pVolumes);
+void __RPC_STUB IXAudio20Voice_GetChannelVolumes_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetOutputMatrix_Proxy(
+ IXAudio20Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20Voice_SetOutputMatrix_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20Voice_GetOutputMatrix_Proxy(
+ IXAudio20Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+void __RPC_STUB IXAudio20Voice_GetOutputMatrix_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20Voice_DestroyVoice_Proxy(
+ IXAudio20Voice* This);
+void __RPC_STUB IXAudio20Voice_DestroyVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio20Voice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio23Voice interface
+ */
+#ifndef __IXAudio23Voice_INTERFACE_DEFINED__
+#define __IXAudio23Voice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio23Voice
+{
+ BEGIN_INTERFACE
+
+ virtual void STDMETHODCALLTYPE GetVoiceDetails(
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetOutputVoices(
+ const XAUDIO23_VOICE_SENDS *pSendList) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetEffectChain(
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE EnableEffect(
+ UINT32 EffectIndex,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE DisableEffect(
+ UINT32 EffectIndex,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetEffectState(
+ UINT32 EffectIndex,
+ BOOL *pEnabled) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetEffectParameters(
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetEffectParameters(
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetFilterParameters(
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetFilterParameters(
+ XAUDIO2_FILTER_PARAMETERS *pParameters) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetVolume(
+ float Volume,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetVolume(
+ float *pVolume) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetChannelVolumes(
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetChannelVolumes(
+ UINT32 Channels,
+ float *pVolumes) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetOutputMatrix(
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetOutputMatrix(
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix) = 0;
+
+ virtual void STDMETHODCALLTYPE DestroyVoice(
+ ) = 0;
+
+ END_INTERFACE
+};
+#else
+typedef struct IXAudio23VoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio23Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio23Voice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio23Voice* This,
+ const XAUDIO23_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio23Voice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio23Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio23Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio23Voice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio23Voice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio23Voice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio23Voice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio23Voice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio23Voice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio23Voice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio23Voice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio23Voice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio23Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio23Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio23Voice* This);
+
+ END_INTERFACE
+} IXAudio23VoiceVtbl;
+interface IXAudio23Voice {
+ CONST_VTBL IXAudio23VoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio23Voice methods ***/
+#define IXAudio23Voice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio23Voice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio23Voice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio23Voice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio23Voice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio23Voice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio23Voice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio23Voice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio23Voice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio23Voice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio23Voice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio23Voice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio23Voice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio23Voice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio23Voice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio23Voice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio23Voice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+#else
+/*** IXAudio23Voice methods ***/
+static FORCEINLINE void IXAudio23Voice_GetVoiceDetails(IXAudio23Voice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio23Voice_SetOutputVoices(IXAudio23Voice* This,const XAUDIO23_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio23Voice_SetEffectChain(IXAudio23Voice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio23Voice_EnableEffect(IXAudio23Voice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio23Voice_DisableEffect(IXAudio23Voice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio23Voice_GetEffectState(IXAudio23Voice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio23Voice_SetEffectParameters(IXAudio23Voice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio23Voice_GetEffectParameters(IXAudio23Voice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio23Voice_SetFilterParameters(IXAudio23Voice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio23Voice_GetFilterParameters(IXAudio23Voice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio23Voice_SetVolume(IXAudio23Voice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio23Voice_GetVolume(IXAudio23Voice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio23Voice_SetChannelVolumes(IXAudio23Voice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio23Voice_GetChannelVolumes(IXAudio23Voice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio23Voice_SetOutputMatrix(IXAudio23Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE void IXAudio23Voice_GetOutputMatrix(IXAudio23Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio23Voice_DestroyVoice(IXAudio23Voice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+#endif
+#endif
+
+#endif
+
+void STDMETHODCALLTYPE IXAudio23Voice_GetVoiceDetails_Proxy(
+ IXAudio23Voice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+void __RPC_STUB IXAudio23Voice_GetVoiceDetails_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetOutputVoices_Proxy(
+ IXAudio23Voice* This,
+ const XAUDIO23_VOICE_SENDS *pSendList);
+void __RPC_STUB IXAudio23Voice_SetOutputVoices_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetEffectChain_Proxy(
+ IXAudio23Voice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio23Voice_SetEffectChain_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23Voice_EnableEffect_Proxy(
+ IXAudio23Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio23Voice_EnableEffect_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23Voice_DisableEffect_Proxy(
+ IXAudio23Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio23Voice_DisableEffect_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio23Voice_GetEffectState_Proxy(
+ IXAudio23Voice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+void __RPC_STUB IXAudio23Voice_GetEffectState_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetEffectParameters_Proxy(
+ IXAudio23Voice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio23Voice_SetEffectParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23Voice_GetEffectParameters_Proxy(
+ IXAudio23Voice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+void __RPC_STUB IXAudio23Voice_GetEffectParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetFilterParameters_Proxy(
+ IXAudio23Voice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio23Voice_SetFilterParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio23Voice_GetFilterParameters_Proxy(
+ IXAudio23Voice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+void __RPC_STUB IXAudio23Voice_GetFilterParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetVolume_Proxy(
+ IXAudio23Voice* This,
+ float Volume,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio23Voice_SetVolume_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio23Voice_GetVolume_Proxy(
+ IXAudio23Voice* This,
+ float *pVolume);
+void __RPC_STUB IXAudio23Voice_GetVolume_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetChannelVolumes_Proxy(
+ IXAudio23Voice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio23Voice_SetChannelVolumes_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio23Voice_GetChannelVolumes_Proxy(
+ IXAudio23Voice* This,
+ UINT32 Channels,
+ float *pVolumes);
+void __RPC_STUB IXAudio23Voice_GetChannelVolumes_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetOutputMatrix_Proxy(
+ IXAudio23Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio23Voice_SetOutputMatrix_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio23Voice_GetOutputMatrix_Proxy(
+ IXAudio23Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+void __RPC_STUB IXAudio23Voice_GetOutputMatrix_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio23Voice_DestroyVoice_Proxy(
+ IXAudio23Voice* This);
+void __RPC_STUB IXAudio23Voice_DestroyVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio23Voice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio2Voice interface
+ */
+#ifndef __IXAudio2Voice_INTERFACE_DEFINED__
+#define __IXAudio2Voice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio2Voice
+{
+ BEGIN_INTERFACE
+
+ virtual void STDMETHODCALLTYPE GetVoiceDetails(
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetOutputVoices(
+ const XAUDIO2_VOICE_SENDS *pSendList) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetEffectChain(
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE EnableEffect(
+ UINT32 EffectIndex,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE DisableEffect(
+ UINT32 EffectIndex,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetEffectState(
+ UINT32 EffectIndex,
+ BOOL *pEnabled) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetEffectParameters(
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetEffectParameters(
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetFilterParameters(
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetFilterParameters(
+ XAUDIO2_FILTER_PARAMETERS *pParameters) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetOutputFilterParameters(
+ IXAudio2Voice *pDestinationVoice,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetOutputFilterParameters(
+ IXAudio2Voice *pDestinationVoice,
+ XAUDIO2_FILTER_PARAMETERS *pParameters) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetVolume(
+ float Volume,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetVolume(
+ float *pVolume) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetChannelVolumes(
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetChannelVolumes(
+ UINT32 Channels,
+ float *pVolumes) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetOutputMatrix(
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetOutputMatrix(
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix) = 0;
+
+ virtual void STDMETHODCALLTYPE DestroyVoice(
+ ) = 0;
+
+ END_INTERFACE
+};
+#else
+typedef struct IXAudio2VoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio2Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio2Voice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio2Voice* This,
+ const XAUDIO2_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio2Voice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio2Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio2Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio2Voice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio2Voice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio2Voice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio2Voice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio2Voice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)(
+ IXAudio2Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputFilterParameters)(
+ IXAudio2Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio2Voice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio2Voice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio2Voice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio2Voice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio2Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio2Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio2Voice* This);
+
+ END_INTERFACE
+} IXAudio2VoiceVtbl;
+interface IXAudio2Voice {
+ CONST_VTBL IXAudio2VoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio2Voice methods ***/
+#define IXAudio2Voice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio2Voice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio2Voice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio2Voice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio2Voice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio2Voice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio2Voice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio2Voice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio2Voice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio2Voice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio2Voice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet)
+#define IXAudio2Voice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters)
+#define IXAudio2Voice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio2Voice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio2Voice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio2Voice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio2Voice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio2Voice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio2Voice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+#else
+/*** IXAudio2Voice methods ***/
+static FORCEINLINE void IXAudio2Voice_GetVoiceDetails(IXAudio2Voice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio2Voice_SetOutputVoices(IXAudio2Voice* This,const XAUDIO2_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio2Voice_SetEffectChain(IXAudio2Voice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio2Voice_EnableEffect(IXAudio2Voice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio2Voice_DisableEffect(IXAudio2Voice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio2Voice_GetEffectState(IXAudio2Voice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio2Voice_SetEffectParameters(IXAudio2Voice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio2Voice_GetEffectParameters(IXAudio2Voice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio2Voice_SetFilterParameters(IXAudio2Voice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio2Voice_GetFilterParameters(IXAudio2Voice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio2Voice_SetOutputFilterParameters(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio2Voice_GetOutputFilterParameters(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio2Voice_SetVolume(IXAudio2Voice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio2Voice_GetVolume(IXAudio2Voice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio2Voice_SetChannelVolumes(IXAudio2Voice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio2Voice_GetChannelVolumes(IXAudio2Voice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio2Voice_SetOutputMatrix(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE void IXAudio2Voice_GetOutputMatrix(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio2Voice_DestroyVoice(IXAudio2Voice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+#endif
+#endif
+
+#endif
+
+void STDMETHODCALLTYPE IXAudio2Voice_GetVoiceDetails_Proxy(
+ IXAudio2Voice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+void __RPC_STUB IXAudio2Voice_GetVoiceDetails_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetOutputVoices_Proxy(
+ IXAudio2Voice* This,
+ const XAUDIO2_VOICE_SENDS *pSendList);
+void __RPC_STUB IXAudio2Voice_SetOutputVoices_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetEffectChain_Proxy(
+ IXAudio2Voice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio2Voice_SetEffectChain_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2Voice_EnableEffect_Proxy(
+ IXAudio2Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2Voice_EnableEffect_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2Voice_DisableEffect_Proxy(
+ IXAudio2Voice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2Voice_DisableEffect_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2Voice_GetEffectState_Proxy(
+ IXAudio2Voice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+void __RPC_STUB IXAudio2Voice_GetEffectState_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetEffectParameters_Proxy(
+ IXAudio2Voice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2Voice_SetEffectParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2Voice_GetEffectParameters_Proxy(
+ IXAudio2Voice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+void __RPC_STUB IXAudio2Voice_GetEffectParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetFilterParameters_Proxy(
+ IXAudio2Voice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2Voice_SetFilterParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2Voice_GetFilterParameters_Proxy(
+ IXAudio2Voice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+void __RPC_STUB IXAudio2Voice_GetFilterParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetOutputFilterParameters_Proxy(
+ IXAudio2Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2Voice_SetOutputFilterParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2Voice_GetOutputFilterParameters_Proxy(
+ IXAudio2Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+void __RPC_STUB IXAudio2Voice_GetOutputFilterParameters_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetVolume_Proxy(
+ IXAudio2Voice* This,
+ float Volume,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2Voice_SetVolume_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2Voice_GetVolume_Proxy(
+ IXAudio2Voice* This,
+ float *pVolume);
+void __RPC_STUB IXAudio2Voice_GetVolume_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetChannelVolumes_Proxy(
+ IXAudio2Voice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2Voice_SetChannelVolumes_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2Voice_GetChannelVolumes_Proxy(
+ IXAudio2Voice* This,
+ UINT32 Channels,
+ float *pVolumes);
+void __RPC_STUB IXAudio2Voice_GetChannelVolumes_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetOutputMatrix_Proxy(
+ IXAudio2Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2Voice_SetOutputMatrix_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2Voice_GetOutputMatrix_Proxy(
+ IXAudio2Voice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+void __RPC_STUB IXAudio2Voice_GetOutputMatrix_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2Voice_DestroyVoice_Proxy(
+ IXAudio2Voice* This);
+void __RPC_STUB IXAudio2Voice_DestroyVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio2Voice_INTERFACE_DEFINED__ */
+
+typedef struct XAUDIO2_BUFFER {
+ UINT32 Flags;
+ UINT32 AudioBytes;
+ const BYTE *pAudioData;
+ UINT32 PlayBegin;
+ UINT32 PlayLength;
+ UINT32 LoopBegin;
+ UINT32 LoopLength;
+ UINT32 LoopCount;
+ void *pContext;
+} XAUDIO2_BUFFER;
+typedef struct XAUDIO2_BUFFER_WMA {
+ const UINT32 *pDecodedPacketCumulativeBytes;
+ UINT32 PacketCount;
+} XAUDIO2_BUFFER_WMA;
+typedef struct XAUDIO2_VOICE_STATE {
+ void *pCurrentBufferContext;
+ UINT32 BuffersQueued;
+ UINT64 SamplesPlayed;
+} XAUDIO2_VOICE_STATE;
+/*****************************************************************************
+ * IXAudio20SourceVoice interface
+ */
+#ifndef __IXAudio20SourceVoice_INTERFACE_DEFINED__
+#define __IXAudio20SourceVoice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio20SourceVoice : public IXAudio20Voice
+{
+ virtual HRESULT STDMETHODCALLTYPE Start(
+ UINT32 Flags = 0,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Stop(
+ UINT32 Flags = 0,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SubmitSourceBuffer(
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FlushSourceBuffers(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Discontinuity(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ExitLoop(
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetState(
+ XAUDIO2_VOICE_STATE *pVoiceState) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetFrequencyRatio(
+ float Ratio,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetFrequencyRatio(
+ float *pRatio) = 0;
+
+};
+#else
+typedef struct IXAudio20SourceVoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio20Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio20SourceVoice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio20SourceVoice* This,
+ const XAUDIO23_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio20SourceVoice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio20SourceVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio20SourceVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio20SourceVoice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio20SourceVoice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio20SourceVoice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio20SourceVoice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio20SourceVoice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio20SourceVoice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio20SourceVoice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio20SourceVoice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio20SourceVoice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio20SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio20SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio20SourceVoice* This);
+
+ /*** IXAudio20SourceVoice methods ***/
+ HRESULT (STDMETHODCALLTYPE *Start)(
+ IXAudio20SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *Stop)(
+ IXAudio20SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *SubmitSourceBuffer)(
+ IXAudio20SourceVoice* This,
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA);
+
+ HRESULT (STDMETHODCALLTYPE *FlushSourceBuffers)(
+ IXAudio20SourceVoice* This);
+
+ HRESULT (STDMETHODCALLTYPE *Discontinuity)(
+ IXAudio20SourceVoice* This);
+
+ HRESULT (STDMETHODCALLTYPE *ExitLoop)(
+ IXAudio20SourceVoice* This,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetState)(
+ IXAudio20SourceVoice* This,
+ XAUDIO2_VOICE_STATE *pVoiceState);
+
+ HRESULT (STDMETHODCALLTYPE *SetFrequencyRatio)(
+ IXAudio20SourceVoice* This,
+ float Ratio,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFrequencyRatio)(
+ IXAudio20SourceVoice* This,
+ float *pRatio);
+
+ END_INTERFACE
+} IXAudio20SourceVoiceVtbl;
+interface IXAudio20SourceVoice {
+ CONST_VTBL IXAudio20SourceVoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio20Voice methods ***/
+#define IXAudio20SourceVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio20SourceVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio20SourceVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio20SourceVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio20SourceVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio20SourceVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio20SourceVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio20SourceVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio20SourceVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio20SourceVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio20SourceVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio20SourceVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio20SourceVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio20SourceVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio20SourceVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio20SourceVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio20SourceVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+/*** IXAudio20SourceVoice methods ***/
+#define IXAudio20SourceVoice_Start(This,Flags,OperationSet) (This)->lpVtbl->Start(This,Flags,OperationSet)
+#define IXAudio20SourceVoice_Stop(This,Flags,OperationSet) (This)->lpVtbl->Stop(This,Flags,OperationSet)
+#define IXAudio20SourceVoice_SubmitSourceBuffer(This,pBuffer,pBufferWMA) (This)->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA)
+#define IXAudio20SourceVoice_FlushSourceBuffers(This) (This)->lpVtbl->FlushSourceBuffers(This)
+#define IXAudio20SourceVoice_Discontinuity(This) (This)->lpVtbl->Discontinuity(This)
+#define IXAudio20SourceVoice_ExitLoop(This,OperationSet) (This)->lpVtbl->ExitLoop(This,OperationSet)
+#define IXAudio20SourceVoice_GetState(This,pVoiceState) (This)->lpVtbl->GetState(This,pVoiceState)
+#define IXAudio20SourceVoice_SetFrequencyRatio(This,Ratio,OperationSet) (This)->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet)
+#define IXAudio20SourceVoice_GetFrequencyRatio(This,pRatio) (This)->lpVtbl->GetFrequencyRatio(This,pRatio)
+#else
+/*** IXAudio20Voice methods ***/
+static FORCEINLINE void IXAudio20SourceVoice_GetVoiceDetails(IXAudio20SourceVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_SetOutputVoices(IXAudio20SourceVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_SetEffectChain(IXAudio20SourceVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_EnableEffect(IXAudio20SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_DisableEffect(IXAudio20SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio20SourceVoice_GetEffectState(IXAudio20SourceVoice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_SetEffectParameters(IXAudio20SourceVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_GetEffectParameters(IXAudio20SourceVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_SetFilterParameters(IXAudio20SourceVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio20SourceVoice_GetFilterParameters(IXAudio20SourceVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_SetVolume(IXAudio20SourceVoice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio20SourceVoice_GetVolume(IXAudio20SourceVoice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_SetChannelVolumes(IXAudio20SourceVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio20SourceVoice_GetChannelVolumes(IXAudio20SourceVoice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_SetOutputMatrix(IXAudio20SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_GetOutputMatrix(IXAudio20SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ return This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio20SourceVoice_DestroyVoice(IXAudio20SourceVoice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+/*** IXAudio20SourceVoice methods ***/
+static FORCEINLINE HRESULT IXAudio20SourceVoice_Start(IXAudio20SourceVoice* This,UINT32 Flags,UINT32 OperationSet) {
+ return This->lpVtbl->Start(This,Flags,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_Stop(IXAudio20SourceVoice* This,UINT32 Flags,UINT32 OperationSet) {
+ return This->lpVtbl->Stop(This,Flags,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_SubmitSourceBuffer(IXAudio20SourceVoice* This,const XAUDIO2_BUFFER *pBuffer,const XAUDIO2_BUFFER_WMA *pBufferWMA) {
+ return This->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_FlushSourceBuffers(IXAudio20SourceVoice* This) {
+ return This->lpVtbl->FlushSourceBuffers(This);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_Discontinuity(IXAudio20SourceVoice* This) {
+ return This->lpVtbl->Discontinuity(This);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_ExitLoop(IXAudio20SourceVoice* This,UINT32 OperationSet) {
+ return This->lpVtbl->ExitLoop(This,OperationSet);
+}
+static FORCEINLINE void IXAudio20SourceVoice_GetState(IXAudio20SourceVoice* This,XAUDIO2_VOICE_STATE *pVoiceState) {
+ This->lpVtbl->GetState(This,pVoiceState);
+}
+static FORCEINLINE HRESULT IXAudio20SourceVoice_SetFrequencyRatio(IXAudio20SourceVoice* This,float Ratio,UINT32 OperationSet) {
+ return This->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet);
+}
+static FORCEINLINE void IXAudio20SourceVoice_GetFrequencyRatio(IXAudio20SourceVoice* This,float *pRatio) {
+ This->lpVtbl->GetFrequencyRatio(This,pRatio);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_Start_Proxy(
+ IXAudio20SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20SourceVoice_Start_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_Stop_Proxy(
+ IXAudio20SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20SourceVoice_Stop_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_SubmitSourceBuffer_Proxy(
+ IXAudio20SourceVoice* This,
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA);
+void __RPC_STUB IXAudio20SourceVoice_SubmitSourceBuffer_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_FlushSourceBuffers_Proxy(
+ IXAudio20SourceVoice* This);
+void __RPC_STUB IXAudio20SourceVoice_FlushSourceBuffers_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_Discontinuity_Proxy(
+ IXAudio20SourceVoice* This);
+void __RPC_STUB IXAudio20SourceVoice_Discontinuity_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_ExitLoop_Proxy(
+ IXAudio20SourceVoice* This,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20SourceVoice_ExitLoop_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20SourceVoice_GetState_Proxy(
+ IXAudio20SourceVoice* This,
+ XAUDIO2_VOICE_STATE *pVoiceState);
+void __RPC_STUB IXAudio20SourceVoice_GetState_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_SetFrequencyRatio_Proxy(
+ IXAudio20SourceVoice* This,
+ float Ratio,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20SourceVoice_SetFrequencyRatio_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20SourceVoice_GetFrequencyRatio_Proxy(
+ IXAudio20SourceVoice* This,
+ float *pRatio);
+void __RPC_STUB IXAudio20SourceVoice_GetFrequencyRatio_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio20SourceVoice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio23SourceVoice interface
+ */
+#ifndef __IXAudio23SourceVoice_INTERFACE_DEFINED__
+#define __IXAudio23SourceVoice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio23SourceVoice : public IXAudio23Voice
+{
+ virtual HRESULT STDMETHODCALLTYPE Start(
+ UINT32 Flags = 0,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Stop(
+ UINT32 Flags = 0,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SubmitSourceBuffer(
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FlushSourceBuffers(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Discontinuity(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ExitLoop(
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetState(
+ XAUDIO2_VOICE_STATE *pVoiceState) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetFrequencyRatio(
+ float Ratio,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetFrequencyRatio(
+ float *pRatio) = 0;
+
+};
+#else
+typedef struct IXAudio23SourceVoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio23Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio23SourceVoice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio23SourceVoice* This,
+ const XAUDIO23_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio23SourceVoice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio23SourceVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio23SourceVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio23SourceVoice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio23SourceVoice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio23SourceVoice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio23SourceVoice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio23SourceVoice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio23SourceVoice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio23SourceVoice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio23SourceVoice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio23SourceVoice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio23SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio23SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio23SourceVoice* This);
+
+ /*** IXAudio23SourceVoice methods ***/
+ HRESULT (STDMETHODCALLTYPE *Start)(
+ IXAudio23SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *Stop)(
+ IXAudio23SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *SubmitSourceBuffer)(
+ IXAudio23SourceVoice* This,
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA);
+
+ HRESULT (STDMETHODCALLTYPE *FlushSourceBuffers)(
+ IXAudio23SourceVoice* This);
+
+ HRESULT (STDMETHODCALLTYPE *Discontinuity)(
+ IXAudio23SourceVoice* This);
+
+ HRESULT (STDMETHODCALLTYPE *ExitLoop)(
+ IXAudio23SourceVoice* This,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetState)(
+ IXAudio23SourceVoice* This,
+ XAUDIO2_VOICE_STATE *pVoiceState);
+
+ HRESULT (STDMETHODCALLTYPE *SetFrequencyRatio)(
+ IXAudio23SourceVoice* This,
+ float Ratio,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFrequencyRatio)(
+ IXAudio23SourceVoice* This,
+ float *pRatio);
+
+ END_INTERFACE
+} IXAudio23SourceVoiceVtbl;
+interface IXAudio23SourceVoice {
+ CONST_VTBL IXAudio23SourceVoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio23Voice methods ***/
+#define IXAudio23SourceVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio23SourceVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio23SourceVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio23SourceVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio23SourceVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio23SourceVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio23SourceVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio23SourceVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio23SourceVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio23SourceVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio23SourceVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio23SourceVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio23SourceVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio23SourceVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio23SourceVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio23SourceVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio23SourceVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+/*** IXAudio23SourceVoice methods ***/
+#define IXAudio23SourceVoice_Start(This,Flags,OperationSet) (This)->lpVtbl->Start(This,Flags,OperationSet)
+#define IXAudio23SourceVoice_Stop(This,Flags,OperationSet) (This)->lpVtbl->Stop(This,Flags,OperationSet)
+#define IXAudio23SourceVoice_SubmitSourceBuffer(This,pBuffer,pBufferWMA) (This)->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA)
+#define IXAudio23SourceVoice_FlushSourceBuffers(This) (This)->lpVtbl->FlushSourceBuffers(This)
+#define IXAudio23SourceVoice_Discontinuity(This) (This)->lpVtbl->Discontinuity(This)
+#define IXAudio23SourceVoice_ExitLoop(This,OperationSet) (This)->lpVtbl->ExitLoop(This,OperationSet)
+#define IXAudio23SourceVoice_GetState(This,pVoiceState) (This)->lpVtbl->GetState(This,pVoiceState)
+#define IXAudio23SourceVoice_SetFrequencyRatio(This,Ratio,OperationSet) (This)->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet)
+#define IXAudio23SourceVoice_GetFrequencyRatio(This,pRatio) (This)->lpVtbl->GetFrequencyRatio(This,pRatio)
+#else
+/*** IXAudio23Voice methods ***/
+static FORCEINLINE void IXAudio23SourceVoice_GetVoiceDetails(IXAudio23SourceVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_SetOutputVoices(IXAudio23SourceVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_SetEffectChain(IXAudio23SourceVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_EnableEffect(IXAudio23SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_DisableEffect(IXAudio23SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio23SourceVoice_GetEffectState(IXAudio23SourceVoice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_SetEffectParameters(IXAudio23SourceVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_GetEffectParameters(IXAudio23SourceVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_SetFilterParameters(IXAudio23SourceVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio23SourceVoice_GetFilterParameters(IXAudio23SourceVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_SetVolume(IXAudio23SourceVoice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio23SourceVoice_GetVolume(IXAudio23SourceVoice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_SetChannelVolumes(IXAudio23SourceVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio23SourceVoice_GetChannelVolumes(IXAudio23SourceVoice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_SetOutputMatrix(IXAudio23SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE void IXAudio23SourceVoice_GetOutputMatrix(IXAudio23SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio23SourceVoice_DestroyVoice(IXAudio23SourceVoice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+/*** IXAudio23SourceVoice methods ***/
+static FORCEINLINE HRESULT IXAudio23SourceVoice_Start(IXAudio23SourceVoice* This,UINT32 Flags,UINT32 OperationSet) {
+ return This->lpVtbl->Start(This,Flags,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_Stop(IXAudio23SourceVoice* This,UINT32 Flags,UINT32 OperationSet) {
+ return This->lpVtbl->Stop(This,Flags,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_SubmitSourceBuffer(IXAudio23SourceVoice* This,const XAUDIO2_BUFFER *pBuffer,const XAUDIO2_BUFFER_WMA *pBufferWMA) {
+ return This->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_FlushSourceBuffers(IXAudio23SourceVoice* This) {
+ return This->lpVtbl->FlushSourceBuffers(This);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_Discontinuity(IXAudio23SourceVoice* This) {
+ return This->lpVtbl->Discontinuity(This);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_ExitLoop(IXAudio23SourceVoice* This,UINT32 OperationSet) {
+ return This->lpVtbl->ExitLoop(This,OperationSet);
+}
+static FORCEINLINE void IXAudio23SourceVoice_GetState(IXAudio23SourceVoice* This,XAUDIO2_VOICE_STATE *pVoiceState) {
+ This->lpVtbl->GetState(This,pVoiceState);
+}
+static FORCEINLINE HRESULT IXAudio23SourceVoice_SetFrequencyRatio(IXAudio23SourceVoice* This,float Ratio,UINT32 OperationSet) {
+ return This->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet);
+}
+static FORCEINLINE void IXAudio23SourceVoice_GetFrequencyRatio(IXAudio23SourceVoice* This,float *pRatio) {
+ This->lpVtbl->GetFrequencyRatio(This,pRatio);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_Start_Proxy(
+ IXAudio23SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio23SourceVoice_Start_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_Stop_Proxy(
+ IXAudio23SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio23SourceVoice_Stop_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_SubmitSourceBuffer_Proxy(
+ IXAudio23SourceVoice* This,
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA);
+void __RPC_STUB IXAudio23SourceVoice_SubmitSourceBuffer_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_FlushSourceBuffers_Proxy(
+ IXAudio23SourceVoice* This);
+void __RPC_STUB IXAudio23SourceVoice_FlushSourceBuffers_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_Discontinuity_Proxy(
+ IXAudio23SourceVoice* This);
+void __RPC_STUB IXAudio23SourceVoice_Discontinuity_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_ExitLoop_Proxy(
+ IXAudio23SourceVoice* This,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio23SourceVoice_ExitLoop_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio23SourceVoice_GetState_Proxy(
+ IXAudio23SourceVoice* This,
+ XAUDIO2_VOICE_STATE *pVoiceState);
+void __RPC_STUB IXAudio23SourceVoice_GetState_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_SetFrequencyRatio_Proxy(
+ IXAudio23SourceVoice* This,
+ float Ratio,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio23SourceVoice_SetFrequencyRatio_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio23SourceVoice_GetFrequencyRatio_Proxy(
+ IXAudio23SourceVoice* This,
+ float *pRatio);
+void __RPC_STUB IXAudio23SourceVoice_GetFrequencyRatio_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio23SourceVoice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio27SourceVoice interface
+ */
+#ifndef __IXAudio27SourceVoice_INTERFACE_DEFINED__
+#define __IXAudio27SourceVoice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio27SourceVoice : public IXAudio2Voice
+{
+ virtual HRESULT STDMETHODCALLTYPE Start(
+ UINT32 Flags = 0,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Stop(
+ UINT32 Flags = 0,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SubmitSourceBuffer(
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FlushSourceBuffers(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Discontinuity(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ExitLoop(
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetState(
+ XAUDIO2_VOICE_STATE *pVoiceState) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetFrequencyRatio(
+ float Ratio,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetFrequencyRatio(
+ float *pRatio) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetSourceSampleRate(
+ UINT32 NewSourceSampleRate) = 0;
+
+};
+#else
+typedef struct IXAudio27SourceVoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio2Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio27SourceVoice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio27SourceVoice* This,
+ const XAUDIO2_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio27SourceVoice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio27SourceVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio27SourceVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio27SourceVoice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio27SourceVoice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio27SourceVoice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio27SourceVoice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio27SourceVoice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)(
+ IXAudio27SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputFilterParameters)(
+ IXAudio27SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio27SourceVoice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio27SourceVoice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio27SourceVoice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio27SourceVoice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio27SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio27SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio27SourceVoice* This);
+
+ /*** IXAudio27SourceVoice methods ***/
+ HRESULT (STDMETHODCALLTYPE *Start)(
+ IXAudio27SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *Stop)(
+ IXAudio27SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *SubmitSourceBuffer)(
+ IXAudio27SourceVoice* This,
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA);
+
+ HRESULT (STDMETHODCALLTYPE *FlushSourceBuffers)(
+ IXAudio27SourceVoice* This);
+
+ HRESULT (STDMETHODCALLTYPE *Discontinuity)(
+ IXAudio27SourceVoice* This);
+
+ HRESULT (STDMETHODCALLTYPE *ExitLoop)(
+ IXAudio27SourceVoice* This,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetState)(
+ IXAudio27SourceVoice* This,
+ XAUDIO2_VOICE_STATE *pVoiceState);
+
+ HRESULT (STDMETHODCALLTYPE *SetFrequencyRatio)(
+ IXAudio27SourceVoice* This,
+ float Ratio,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFrequencyRatio)(
+ IXAudio27SourceVoice* This,
+ float *pRatio);
+
+ HRESULT (STDMETHODCALLTYPE *SetSourceSampleRate)(
+ IXAudio27SourceVoice* This,
+ UINT32 NewSourceSampleRate);
+
+ END_INTERFACE
+} IXAudio27SourceVoiceVtbl;
+interface IXAudio27SourceVoice {
+ CONST_VTBL IXAudio27SourceVoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio2Voice methods ***/
+#define IXAudio27SourceVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio27SourceVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio27SourceVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio27SourceVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio27SourceVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio27SourceVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio27SourceVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio27SourceVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio27SourceVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio27SourceVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio27SourceVoice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet)
+#define IXAudio27SourceVoice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters)
+#define IXAudio27SourceVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio27SourceVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio27SourceVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio27SourceVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio27SourceVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio27SourceVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio27SourceVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+/*** IXAudio27SourceVoice methods ***/
+#define IXAudio27SourceVoice_Start(This,Flags,OperationSet) (This)->lpVtbl->Start(This,Flags,OperationSet)
+#define IXAudio27SourceVoice_Stop(This,Flags,OperationSet) (This)->lpVtbl->Stop(This,Flags,OperationSet)
+#define IXAudio27SourceVoice_SubmitSourceBuffer(This,pBuffer,pBufferWMA) (This)->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA)
+#define IXAudio27SourceVoice_FlushSourceBuffers(This) (This)->lpVtbl->FlushSourceBuffers(This)
+#define IXAudio27SourceVoice_Discontinuity(This) (This)->lpVtbl->Discontinuity(This)
+#define IXAudio27SourceVoice_ExitLoop(This,OperationSet) (This)->lpVtbl->ExitLoop(This,OperationSet)
+#define IXAudio27SourceVoice_GetState(This,pVoiceState) (This)->lpVtbl->GetState(This,pVoiceState)
+#define IXAudio27SourceVoice_SetFrequencyRatio(This,Ratio,OperationSet) (This)->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet)
+#define IXAudio27SourceVoice_GetFrequencyRatio(This,pRatio) (This)->lpVtbl->GetFrequencyRatio(This,pRatio)
+#define IXAudio27SourceVoice_SetSourceSampleRate(This,NewSourceSampleRate) (This)->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate)
+#else
+/*** IXAudio2Voice methods ***/
+static FORCEINLINE void IXAudio27SourceVoice_GetVoiceDetails(IXAudio27SourceVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_SetOutputVoices(IXAudio27SourceVoice* This,const XAUDIO2_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_SetEffectChain(IXAudio27SourceVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_EnableEffect(IXAudio27SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_DisableEffect(IXAudio27SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio27SourceVoice_GetEffectState(IXAudio27SourceVoice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_SetEffectParameters(IXAudio27SourceVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_GetEffectParameters(IXAudio27SourceVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_SetFilterParameters(IXAudio27SourceVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio27SourceVoice_GetFilterParameters(IXAudio27SourceVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_SetOutputFilterParameters(IXAudio27SourceVoice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio27SourceVoice_GetOutputFilterParameters(IXAudio27SourceVoice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_SetVolume(IXAudio27SourceVoice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio27SourceVoice_GetVolume(IXAudio27SourceVoice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_SetChannelVolumes(IXAudio27SourceVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio27SourceVoice_GetChannelVolumes(IXAudio27SourceVoice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_SetOutputMatrix(IXAudio27SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE void IXAudio27SourceVoice_GetOutputMatrix(IXAudio27SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio27SourceVoice_DestroyVoice(IXAudio27SourceVoice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+/*** IXAudio27SourceVoice methods ***/
+static FORCEINLINE HRESULT IXAudio27SourceVoice_Start(IXAudio27SourceVoice* This,UINT32 Flags,UINT32 OperationSet) {
+ return This->lpVtbl->Start(This,Flags,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_Stop(IXAudio27SourceVoice* This,UINT32 Flags,UINT32 OperationSet) {
+ return This->lpVtbl->Stop(This,Flags,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_SubmitSourceBuffer(IXAudio27SourceVoice* This,const XAUDIO2_BUFFER *pBuffer,const XAUDIO2_BUFFER_WMA *pBufferWMA) {
+ return This->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_FlushSourceBuffers(IXAudio27SourceVoice* This) {
+ return This->lpVtbl->FlushSourceBuffers(This);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_Discontinuity(IXAudio27SourceVoice* This) {
+ return This->lpVtbl->Discontinuity(This);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_ExitLoop(IXAudio27SourceVoice* This,UINT32 OperationSet) {
+ return This->lpVtbl->ExitLoop(This,OperationSet);
+}
+static FORCEINLINE void IXAudio27SourceVoice_GetState(IXAudio27SourceVoice* This,XAUDIO2_VOICE_STATE *pVoiceState) {
+ This->lpVtbl->GetState(This,pVoiceState);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_SetFrequencyRatio(IXAudio27SourceVoice* This,float Ratio,UINT32 OperationSet) {
+ return This->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet);
+}
+static FORCEINLINE void IXAudio27SourceVoice_GetFrequencyRatio(IXAudio27SourceVoice* This,float *pRatio) {
+ This->lpVtbl->GetFrequencyRatio(This,pRatio);
+}
+static FORCEINLINE HRESULT IXAudio27SourceVoice_SetSourceSampleRate(IXAudio27SourceVoice* This,UINT32 NewSourceSampleRate) {
+ return This->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_Start_Proxy(
+ IXAudio27SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio27SourceVoice_Start_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_Stop_Proxy(
+ IXAudio27SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio27SourceVoice_Stop_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_SubmitSourceBuffer_Proxy(
+ IXAudio27SourceVoice* This,
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA);
+void __RPC_STUB IXAudio27SourceVoice_SubmitSourceBuffer_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_FlushSourceBuffers_Proxy(
+ IXAudio27SourceVoice* This);
+void __RPC_STUB IXAudio27SourceVoice_FlushSourceBuffers_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_Discontinuity_Proxy(
+ IXAudio27SourceVoice* This);
+void __RPC_STUB IXAudio27SourceVoice_Discontinuity_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_ExitLoop_Proxy(
+ IXAudio27SourceVoice* This,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio27SourceVoice_ExitLoop_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio27SourceVoice_GetState_Proxy(
+ IXAudio27SourceVoice* This,
+ XAUDIO2_VOICE_STATE *pVoiceState);
+void __RPC_STUB IXAudio27SourceVoice_GetState_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_SetFrequencyRatio_Proxy(
+ IXAudio27SourceVoice* This,
+ float Ratio,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio27SourceVoice_SetFrequencyRatio_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio27SourceVoice_GetFrequencyRatio_Proxy(
+ IXAudio27SourceVoice* This,
+ float *pRatio);
+void __RPC_STUB IXAudio27SourceVoice_GetFrequencyRatio_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_SetSourceSampleRate_Proxy(
+ IXAudio27SourceVoice* This,
+ UINT32 NewSourceSampleRate);
+void __RPC_STUB IXAudio27SourceVoice_SetSourceSampleRate_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio27SourceVoice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio2SourceVoice interface
+ */
+#ifndef __IXAudio2SourceVoice_INTERFACE_DEFINED__
+#define __IXAudio2SourceVoice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio2SourceVoice : public IXAudio2Voice
+{
+ virtual HRESULT STDMETHODCALLTYPE Start(
+ UINT32 Flags = 0,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Stop(
+ UINT32 Flags = 0,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SubmitSourceBuffer(
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FlushSourceBuffers(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Discontinuity(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ExitLoop(
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetState(
+ XAUDIO2_VOICE_STATE *pVoiceState,
+ UINT32 Flags = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetFrequencyRatio(
+ float Ratio,
+ UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0;
+
+ virtual void STDMETHODCALLTYPE GetFrequencyRatio(
+ float *pRatio) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetSourceSampleRate(
+ UINT32 NewSourceSampleRate) = 0;
+
+};
+#else
+typedef struct IXAudio2SourceVoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio2Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio2SourceVoice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio2SourceVoice* This,
+ const XAUDIO2_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio2SourceVoice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio2SourceVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio2SourceVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio2SourceVoice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio2SourceVoice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio2SourceVoice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio2SourceVoice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio2SourceVoice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)(
+ IXAudio2SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputFilterParameters)(
+ IXAudio2SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio2SourceVoice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio2SourceVoice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio2SourceVoice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio2SourceVoice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio2SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio2SourceVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio2SourceVoice* This);
+
+ /*** IXAudio2SourceVoice methods ***/
+ HRESULT (STDMETHODCALLTYPE *Start)(
+ IXAudio2SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *Stop)(
+ IXAudio2SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *SubmitSourceBuffer)(
+ IXAudio2SourceVoice* This,
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA);
+
+ HRESULT (STDMETHODCALLTYPE *FlushSourceBuffers)(
+ IXAudio2SourceVoice* This);
+
+ HRESULT (STDMETHODCALLTYPE *Discontinuity)(
+ IXAudio2SourceVoice* This);
+
+ HRESULT (STDMETHODCALLTYPE *ExitLoop)(
+ IXAudio2SourceVoice* This,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetState)(
+ IXAudio2SourceVoice* This,
+ XAUDIO2_VOICE_STATE *pVoiceState,
+ UINT32 Flags);
+
+ HRESULT (STDMETHODCALLTYPE *SetFrequencyRatio)(
+ IXAudio2SourceVoice* This,
+ float Ratio,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFrequencyRatio)(
+ IXAudio2SourceVoice* This,
+ float *pRatio);
+
+ HRESULT (STDMETHODCALLTYPE *SetSourceSampleRate)(
+ IXAudio2SourceVoice* This,
+ UINT32 NewSourceSampleRate);
+
+ END_INTERFACE
+} IXAudio2SourceVoiceVtbl;
+interface IXAudio2SourceVoice {
+ CONST_VTBL IXAudio2SourceVoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio2Voice methods ***/
+#define IXAudio2SourceVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio2SourceVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio2SourceVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio2SourceVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio2SourceVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio2SourceVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio2SourceVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio2SourceVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio2SourceVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio2SourceVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio2SourceVoice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet)
+#define IXAudio2SourceVoice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters)
+#define IXAudio2SourceVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio2SourceVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio2SourceVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio2SourceVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio2SourceVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio2SourceVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio2SourceVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+/*** IXAudio2SourceVoice methods ***/
+#define IXAudio2SourceVoice_Start(This,Flags,OperationSet) (This)->lpVtbl->Start(This,Flags,OperationSet)
+#define IXAudio2SourceVoice_Stop(This,Flags,OperationSet) (This)->lpVtbl->Stop(This,Flags,OperationSet)
+#define IXAudio2SourceVoice_SubmitSourceBuffer(This,pBuffer,pBufferWMA) (This)->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA)
+#define IXAudio2SourceVoice_FlushSourceBuffers(This) (This)->lpVtbl->FlushSourceBuffers(This)
+#define IXAudio2SourceVoice_Discontinuity(This) (This)->lpVtbl->Discontinuity(This)
+#define IXAudio2SourceVoice_ExitLoop(This,OperationSet) (This)->lpVtbl->ExitLoop(This,OperationSet)
+#define IXAudio2SourceVoice_GetState(This,pVoiceState,Flags) (This)->lpVtbl->GetState(This,pVoiceState,Flags)
+#define IXAudio2SourceVoice_SetFrequencyRatio(This,Ratio,OperationSet) (This)->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet)
+#define IXAudio2SourceVoice_GetFrequencyRatio(This,pRatio) (This)->lpVtbl->GetFrequencyRatio(This,pRatio)
+#define IXAudio2SourceVoice_SetSourceSampleRate(This,NewSourceSampleRate) (This)->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate)
+#else
+/*** IXAudio2Voice methods ***/
+static FORCEINLINE void IXAudio2SourceVoice_GetVoiceDetails(IXAudio2SourceVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_SetOutputVoices(IXAudio2SourceVoice* This,const XAUDIO2_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_SetEffectChain(IXAudio2SourceVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_EnableEffect(IXAudio2SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_DisableEffect(IXAudio2SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio2SourceVoice_GetEffectState(IXAudio2SourceVoice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_SetEffectParameters(IXAudio2SourceVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_GetEffectParameters(IXAudio2SourceVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_SetFilterParameters(IXAudio2SourceVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio2SourceVoice_GetFilterParameters(IXAudio2SourceVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_SetOutputFilterParameters(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio2SourceVoice_GetOutputFilterParameters(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_SetVolume(IXAudio2SourceVoice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio2SourceVoice_GetVolume(IXAudio2SourceVoice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_SetChannelVolumes(IXAudio2SourceVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio2SourceVoice_GetChannelVolumes(IXAudio2SourceVoice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_SetOutputMatrix(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE void IXAudio2SourceVoice_GetOutputMatrix(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio2SourceVoice_DestroyVoice(IXAudio2SourceVoice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+/*** IXAudio2SourceVoice methods ***/
+static FORCEINLINE HRESULT IXAudio2SourceVoice_Start(IXAudio2SourceVoice* This,UINT32 Flags,UINT32 OperationSet) {
+ return This->lpVtbl->Start(This,Flags,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_Stop(IXAudio2SourceVoice* This,UINT32 Flags,UINT32 OperationSet) {
+ return This->lpVtbl->Stop(This,Flags,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_SubmitSourceBuffer(IXAudio2SourceVoice* This,const XAUDIO2_BUFFER *pBuffer,const XAUDIO2_BUFFER_WMA *pBufferWMA) {
+ return This->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_FlushSourceBuffers(IXAudio2SourceVoice* This) {
+ return This->lpVtbl->FlushSourceBuffers(This);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_Discontinuity(IXAudio2SourceVoice* This) {
+ return This->lpVtbl->Discontinuity(This);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_ExitLoop(IXAudio2SourceVoice* This,UINT32 OperationSet) {
+ return This->lpVtbl->ExitLoop(This,OperationSet);
+}
+static FORCEINLINE void IXAudio2SourceVoice_GetState(IXAudio2SourceVoice* This,XAUDIO2_VOICE_STATE *pVoiceState,UINT32 Flags) {
+ This->lpVtbl->GetState(This,pVoiceState,Flags);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_SetFrequencyRatio(IXAudio2SourceVoice* This,float Ratio,UINT32 OperationSet) {
+ return This->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet);
+}
+static FORCEINLINE void IXAudio2SourceVoice_GetFrequencyRatio(IXAudio2SourceVoice* This,float *pRatio) {
+ This->lpVtbl->GetFrequencyRatio(This,pRatio);
+}
+static FORCEINLINE HRESULT IXAudio2SourceVoice_SetSourceSampleRate(IXAudio2SourceVoice* This,UINT32 NewSourceSampleRate) {
+ return This->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_Start_Proxy(
+ IXAudio2SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2SourceVoice_Start_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_Stop_Proxy(
+ IXAudio2SourceVoice* This,
+ UINT32 Flags,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2SourceVoice_Stop_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_SubmitSourceBuffer_Proxy(
+ IXAudio2SourceVoice* This,
+ const XAUDIO2_BUFFER *pBuffer,
+ const XAUDIO2_BUFFER_WMA *pBufferWMA);
+void __RPC_STUB IXAudio2SourceVoice_SubmitSourceBuffer_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_FlushSourceBuffers_Proxy(
+ IXAudio2SourceVoice* This);
+void __RPC_STUB IXAudio2SourceVoice_FlushSourceBuffers_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_Discontinuity_Proxy(
+ IXAudio2SourceVoice* This);
+void __RPC_STUB IXAudio2SourceVoice_Discontinuity_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_ExitLoop_Proxy(
+ IXAudio2SourceVoice* This,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2SourceVoice_ExitLoop_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2SourceVoice_GetState_Proxy(
+ IXAudio2SourceVoice* This,
+ XAUDIO2_VOICE_STATE *pVoiceState,
+ UINT32 Flags);
+void __RPC_STUB IXAudio2SourceVoice_GetState_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_SetFrequencyRatio_Proxy(
+ IXAudio2SourceVoice* This,
+ float Ratio,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2SourceVoice_SetFrequencyRatio_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2SourceVoice_GetFrequencyRatio_Proxy(
+ IXAudio2SourceVoice* This,
+ float *pRatio);
+void __RPC_STUB IXAudio2SourceVoice_GetFrequencyRatio_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_SetSourceSampleRate_Proxy(
+ IXAudio2SourceVoice* This,
+ UINT32 NewSourceSampleRate);
+void __RPC_STUB IXAudio2SourceVoice_SetSourceSampleRate_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio2SourceVoice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio20SubmixVoice interface
+ */
+#ifndef __IXAudio20SubmixVoice_INTERFACE_DEFINED__
+#define __IXAudio20SubmixVoice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio20SubmixVoice : public IXAudio20Voice
+{
+};
+#else
+typedef struct IXAudio20SubmixVoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio20Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio20SubmixVoice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio20SubmixVoice* This,
+ const XAUDIO23_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio20SubmixVoice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio20SubmixVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio20SubmixVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio20SubmixVoice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio20SubmixVoice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio20SubmixVoice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio20SubmixVoice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio20SubmixVoice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio20SubmixVoice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio20SubmixVoice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio20SubmixVoice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio20SubmixVoice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio20SubmixVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio20SubmixVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio20SubmixVoice* This);
+
+ END_INTERFACE
+} IXAudio20SubmixVoiceVtbl;
+interface IXAudio20SubmixVoice {
+ CONST_VTBL IXAudio20SubmixVoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio20Voice methods ***/
+#define IXAudio20SubmixVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio20SubmixVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio20SubmixVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio20SubmixVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio20SubmixVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio20SubmixVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio20SubmixVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio20SubmixVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio20SubmixVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio20SubmixVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio20SubmixVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio20SubmixVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio20SubmixVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio20SubmixVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio20SubmixVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio20SubmixVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio20SubmixVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+#else
+/*** IXAudio20Voice methods ***/
+static FORCEINLINE void IXAudio20SubmixVoice_GetVoiceDetails(IXAudio20SubmixVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetOutputVoices(IXAudio20SubmixVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetEffectChain(IXAudio20SubmixVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio20SubmixVoice_EnableEffect(IXAudio20SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20SubmixVoice_DisableEffect(IXAudio20SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio20SubmixVoice_GetEffectState(IXAudio20SubmixVoice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetEffectParameters(IXAudio20SubmixVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20SubmixVoice_GetEffectParameters(IXAudio20SubmixVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetFilterParameters(IXAudio20SubmixVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio20SubmixVoice_GetFilterParameters(IXAudio20SubmixVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetVolume(IXAudio20SubmixVoice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio20SubmixVoice_GetVolume(IXAudio20SubmixVoice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetChannelVolumes(IXAudio20SubmixVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio20SubmixVoice_GetChannelVolumes(IXAudio20SubmixVoice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetOutputMatrix(IXAudio20SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20SubmixVoice_GetOutputMatrix(IXAudio20SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ return This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio20SubmixVoice_DestroyVoice(IXAudio20SubmixVoice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+#endif
+#endif
+
+#endif
+
+
+#endif /* __IXAudio20SubmixVoice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio23SubmixVoice interface
+ */
+#ifndef __IXAudio23SubmixVoice_INTERFACE_DEFINED__
+#define __IXAudio23SubmixVoice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio23SubmixVoice : public IXAudio23Voice
+{
+};
+#else
+typedef struct IXAudio23SubmixVoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio23Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio23SubmixVoice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio23SubmixVoice* This,
+ const XAUDIO23_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio23SubmixVoice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio23SubmixVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio23SubmixVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio23SubmixVoice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio23SubmixVoice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio23SubmixVoice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio23SubmixVoice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio23SubmixVoice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio23SubmixVoice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio23SubmixVoice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio23SubmixVoice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio23SubmixVoice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio23SubmixVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio23SubmixVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio23SubmixVoice* This);
+
+ END_INTERFACE
+} IXAudio23SubmixVoiceVtbl;
+interface IXAudio23SubmixVoice {
+ CONST_VTBL IXAudio23SubmixVoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio23Voice methods ***/
+#define IXAudio23SubmixVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio23SubmixVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio23SubmixVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio23SubmixVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio23SubmixVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio23SubmixVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio23SubmixVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio23SubmixVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio23SubmixVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio23SubmixVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio23SubmixVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio23SubmixVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio23SubmixVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio23SubmixVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio23SubmixVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio23SubmixVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio23SubmixVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+#else
+/*** IXAudio23Voice methods ***/
+static FORCEINLINE void IXAudio23SubmixVoice_GetVoiceDetails(IXAudio23SubmixVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetOutputVoices(IXAudio23SubmixVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetEffectChain(IXAudio23SubmixVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio23SubmixVoice_EnableEffect(IXAudio23SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio23SubmixVoice_DisableEffect(IXAudio23SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio23SubmixVoice_GetEffectState(IXAudio23SubmixVoice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetEffectParameters(IXAudio23SubmixVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio23SubmixVoice_GetEffectParameters(IXAudio23SubmixVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetFilterParameters(IXAudio23SubmixVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio23SubmixVoice_GetFilterParameters(IXAudio23SubmixVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetVolume(IXAudio23SubmixVoice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio23SubmixVoice_GetVolume(IXAudio23SubmixVoice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetChannelVolumes(IXAudio23SubmixVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio23SubmixVoice_GetChannelVolumes(IXAudio23SubmixVoice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetOutputMatrix(IXAudio23SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE void IXAudio23SubmixVoice_GetOutputMatrix(IXAudio23SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio23SubmixVoice_DestroyVoice(IXAudio23SubmixVoice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+#endif
+#endif
+
+#endif
+
+
+#endif /* __IXAudio23SubmixVoice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio2SubmixVoice interface
+ */
+#ifndef __IXAudio2SubmixVoice_INTERFACE_DEFINED__
+#define __IXAudio2SubmixVoice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio2SubmixVoice : public IXAudio2Voice
+{
+};
+#else
+typedef struct IXAudio2SubmixVoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio2Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio2SubmixVoice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio2SubmixVoice* This,
+ const XAUDIO2_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio2SubmixVoice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio2SubmixVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio2SubmixVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio2SubmixVoice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio2SubmixVoice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio2SubmixVoice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio2SubmixVoice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio2SubmixVoice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)(
+ IXAudio2SubmixVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputFilterParameters)(
+ IXAudio2SubmixVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio2SubmixVoice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio2SubmixVoice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio2SubmixVoice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio2SubmixVoice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio2SubmixVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio2SubmixVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio2SubmixVoice* This);
+
+ END_INTERFACE
+} IXAudio2SubmixVoiceVtbl;
+interface IXAudio2SubmixVoice {
+ CONST_VTBL IXAudio2SubmixVoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio2Voice methods ***/
+#define IXAudio2SubmixVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio2SubmixVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio2SubmixVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio2SubmixVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio2SubmixVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio2SubmixVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio2SubmixVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio2SubmixVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio2SubmixVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio2SubmixVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio2SubmixVoice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet)
+#define IXAudio2SubmixVoice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters)
+#define IXAudio2SubmixVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio2SubmixVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio2SubmixVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio2SubmixVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio2SubmixVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio2SubmixVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio2SubmixVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+#else
+/*** IXAudio2Voice methods ***/
+static FORCEINLINE void IXAudio2SubmixVoice_GetVoiceDetails(IXAudio2SubmixVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetOutputVoices(IXAudio2SubmixVoice* This,const XAUDIO2_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetEffectChain(IXAudio2SubmixVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio2SubmixVoice_EnableEffect(IXAudio2SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio2SubmixVoice_DisableEffect(IXAudio2SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio2SubmixVoice_GetEffectState(IXAudio2SubmixVoice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetEffectParameters(IXAudio2SubmixVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio2SubmixVoice_GetEffectParameters(IXAudio2SubmixVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetFilterParameters(IXAudio2SubmixVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio2SubmixVoice_GetFilterParameters(IXAudio2SubmixVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetOutputFilterParameters(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio2SubmixVoice_GetOutputFilterParameters(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetVolume(IXAudio2SubmixVoice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio2SubmixVoice_GetVolume(IXAudio2SubmixVoice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetChannelVolumes(IXAudio2SubmixVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio2SubmixVoice_GetChannelVolumes(IXAudio2SubmixVoice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetOutputMatrix(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE void IXAudio2SubmixVoice_GetOutputMatrix(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio2SubmixVoice_DestroyVoice(IXAudio2SubmixVoice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+#endif
+#endif
+
+#endif
+
+
+#endif /* __IXAudio2SubmixVoice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio20MasteringVoice interface
+ */
+#ifndef __IXAudio20MasteringVoice_INTERFACE_DEFINED__
+#define __IXAudio20MasteringVoice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio20MasteringVoice : public IXAudio20Voice
+{
+};
+#else
+typedef struct IXAudio20MasteringVoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio20Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio20MasteringVoice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio20MasteringVoice* This,
+ const XAUDIO23_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio20MasteringVoice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio20MasteringVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio20MasteringVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio20MasteringVoice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio20MasteringVoice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio20MasteringVoice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio20MasteringVoice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio20MasteringVoice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio20MasteringVoice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio20MasteringVoice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio20MasteringVoice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio20MasteringVoice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio20MasteringVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio20MasteringVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio20MasteringVoice* This);
+
+ END_INTERFACE
+} IXAudio20MasteringVoiceVtbl;
+interface IXAudio20MasteringVoice {
+ CONST_VTBL IXAudio20MasteringVoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio20Voice methods ***/
+#define IXAudio20MasteringVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio20MasteringVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio20MasteringVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio20MasteringVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio20MasteringVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio20MasteringVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio20MasteringVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio20MasteringVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio20MasteringVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio20MasteringVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio20MasteringVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio20MasteringVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio20MasteringVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio20MasteringVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio20MasteringVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio20MasteringVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio20MasteringVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+#else
+/*** IXAudio20Voice methods ***/
+static FORCEINLINE void IXAudio20MasteringVoice_GetVoiceDetails(IXAudio20MasteringVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetOutputVoices(IXAudio20MasteringVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetEffectChain(IXAudio20MasteringVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio20MasteringVoice_EnableEffect(IXAudio20MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20MasteringVoice_DisableEffect(IXAudio20MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio20MasteringVoice_GetEffectState(IXAudio20MasteringVoice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetEffectParameters(IXAudio20MasteringVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20MasteringVoice_GetEffectParameters(IXAudio20MasteringVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetFilterParameters(IXAudio20MasteringVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio20MasteringVoice_GetFilterParameters(IXAudio20MasteringVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetVolume(IXAudio20MasteringVoice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio20MasteringVoice_GetVolume(IXAudio20MasteringVoice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetChannelVolumes(IXAudio20MasteringVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio20MasteringVoice_GetChannelVolumes(IXAudio20MasteringVoice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetOutputMatrix(IXAudio20MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio20MasteringVoice_GetOutputMatrix(IXAudio20MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ return This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio20MasteringVoice_DestroyVoice(IXAudio20MasteringVoice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+#endif
+#endif
+
+#endif
+
+
+#endif /* __IXAudio20MasteringVoice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio23MasteringVoice interface
+ */
+#ifndef __IXAudio23MasteringVoice_INTERFACE_DEFINED__
+#define __IXAudio23MasteringVoice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio23MasteringVoice : public IXAudio23Voice
+{
+};
+#else
+typedef struct IXAudio23MasteringVoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio23Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio23MasteringVoice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio23MasteringVoice* This,
+ const XAUDIO23_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio23MasteringVoice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio23MasteringVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio23MasteringVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio23MasteringVoice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio23MasteringVoice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio23MasteringVoice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio23MasteringVoice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio23MasteringVoice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio23MasteringVoice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio23MasteringVoice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio23MasteringVoice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio23MasteringVoice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio23MasteringVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio23MasteringVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio23MasteringVoice* This);
+
+ END_INTERFACE
+} IXAudio23MasteringVoiceVtbl;
+interface IXAudio23MasteringVoice {
+ CONST_VTBL IXAudio23MasteringVoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio23Voice methods ***/
+#define IXAudio23MasteringVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio23MasteringVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio23MasteringVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio23MasteringVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio23MasteringVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio23MasteringVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio23MasteringVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio23MasteringVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio23MasteringVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio23MasteringVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio23MasteringVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio23MasteringVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio23MasteringVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio23MasteringVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio23MasteringVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio23MasteringVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio23MasteringVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+#else
+/*** IXAudio23Voice methods ***/
+static FORCEINLINE void IXAudio23MasteringVoice_GetVoiceDetails(IXAudio23MasteringVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetOutputVoices(IXAudio23MasteringVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetEffectChain(IXAudio23MasteringVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio23MasteringVoice_EnableEffect(IXAudio23MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio23MasteringVoice_DisableEffect(IXAudio23MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio23MasteringVoice_GetEffectState(IXAudio23MasteringVoice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetEffectParameters(IXAudio23MasteringVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio23MasteringVoice_GetEffectParameters(IXAudio23MasteringVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetFilterParameters(IXAudio23MasteringVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio23MasteringVoice_GetFilterParameters(IXAudio23MasteringVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetVolume(IXAudio23MasteringVoice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio23MasteringVoice_GetVolume(IXAudio23MasteringVoice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetChannelVolumes(IXAudio23MasteringVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio23MasteringVoice_GetChannelVolumes(IXAudio23MasteringVoice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetOutputMatrix(IXAudio23MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE void IXAudio23MasteringVoice_GetOutputMatrix(IXAudio23MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio23MasteringVoice_DestroyVoice(IXAudio23MasteringVoice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+#endif
+#endif
+
+#endif
+
+
+#endif /* __IXAudio23MasteringVoice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio2MasteringVoice interface
+ */
+#ifndef __IXAudio2MasteringVoice_INTERFACE_DEFINED__
+#define __IXAudio2MasteringVoice_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio2MasteringVoice : public IXAudio2Voice
+{
+ virtual void STDMETHODCALLTYPE GetChannelMask(
+ DWORD *pChannelMask) = 0;
+
+};
+#else
+typedef struct IXAudio2MasteringVoiceVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio2Voice methods ***/
+ void (STDMETHODCALLTYPE *GetVoiceDetails)(
+ IXAudio2MasteringVoice* This,
+ XAUDIO2_VOICE_DETAILS *pVoiceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputVoices)(
+ IXAudio2MasteringVoice* This,
+ const XAUDIO2_VOICE_SENDS *pSendList);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectChain)(
+ IXAudio2MasteringVoice* This,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *EnableEffect)(
+ IXAudio2MasteringVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *DisableEffect)(
+ IXAudio2MasteringVoice* This,
+ UINT32 EffectIndex,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetEffectState)(
+ IXAudio2MasteringVoice* This,
+ UINT32 EffectIndex,
+ BOOL *pEnabled);
+
+ HRESULT (STDMETHODCALLTYPE *SetEffectParameters)(
+ IXAudio2MasteringVoice* This,
+ UINT32 EffectIndex,
+ const void *pParameters,
+ UINT32 ParametersByteSize,
+ UINT32 OperationSet);
+
+ HRESULT (STDMETHODCALLTYPE *GetEffectParameters)(
+ IXAudio2MasteringVoice* This,
+ UINT32 EffectIndex,
+ void *pParameters,
+ UINT32 ParametersByteSize);
+
+ HRESULT (STDMETHODCALLTYPE *SetFilterParameters)(
+ IXAudio2MasteringVoice* This,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetFilterParameters)(
+ IXAudio2MasteringVoice* This,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)(
+ IXAudio2MasteringVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ const XAUDIO2_FILTER_PARAMETERS *pParameters,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputFilterParameters)(
+ IXAudio2MasteringVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ XAUDIO2_FILTER_PARAMETERS *pParameters);
+
+ HRESULT (STDMETHODCALLTYPE *SetVolume)(
+ IXAudio2MasteringVoice* This,
+ float Volume,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetVolume)(
+ IXAudio2MasteringVoice* This,
+ float *pVolume);
+
+ HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)(
+ IXAudio2MasteringVoice* This,
+ UINT32 Channels,
+ const float *pVolumes,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetChannelVolumes)(
+ IXAudio2MasteringVoice* This,
+ UINT32 Channels,
+ float *pVolumes);
+
+ HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)(
+ IXAudio2MasteringVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ const float *pLevelMatrix,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetOutputMatrix)(
+ IXAudio2MasteringVoice* This,
+ IXAudio2Voice *pDestinationVoice,
+ UINT32 SourceChannels,
+ UINT32 DestinationChannels,
+ float *pLevelMatrix);
+
+ void (STDMETHODCALLTYPE *DestroyVoice)(
+ IXAudio2MasteringVoice* This);
+
+ /*** IXAudio2MasteringVoice methods ***/
+ void (STDMETHODCALLTYPE *GetChannelMask)(
+ IXAudio2MasteringVoice* This,
+ DWORD *pChannelMask);
+
+ END_INTERFACE
+} IXAudio2MasteringVoiceVtbl;
+interface IXAudio2MasteringVoice {
+ CONST_VTBL IXAudio2MasteringVoiceVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio2Voice methods ***/
+#define IXAudio2MasteringVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)
+#define IXAudio2MasteringVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList)
+#define IXAudio2MasteringVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain)
+#define IXAudio2MasteringVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)
+#define IXAudio2MasteringVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)
+#define IXAudio2MasteringVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)
+#define IXAudio2MasteringVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)
+#define IXAudio2MasteringVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)
+#define IXAudio2MasteringVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)
+#define IXAudio2MasteringVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters)
+#define IXAudio2MasteringVoice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet)
+#define IXAudio2MasteringVoice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters)
+#define IXAudio2MasteringVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet)
+#define IXAudio2MasteringVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume)
+#define IXAudio2MasteringVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)
+#define IXAudio2MasteringVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)
+#define IXAudio2MasteringVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)
+#define IXAudio2MasteringVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)
+#define IXAudio2MasteringVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This)
+/*** IXAudio2MasteringVoice methods ***/
+#define IXAudio2MasteringVoice_GetChannelMask(This,pChannelMask) (This)->lpVtbl->GetChannelMask(This,pChannelMask)
+#else
+/*** IXAudio2Voice methods ***/
+static FORCEINLINE void IXAudio2MasteringVoice_GetVoiceDetails(IXAudio2MasteringVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) {
+ This->lpVtbl->GetVoiceDetails(This,pVoiceDetails);
+}
+static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetOutputVoices(IXAudio2MasteringVoice* This,const XAUDIO2_VOICE_SENDS *pSendList) {
+ return This->lpVtbl->SetOutputVoices(This,pSendList);
+}
+static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetEffectChain(IXAudio2MasteringVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->SetEffectChain(This,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio2MasteringVoice_EnableEffect(IXAudio2MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio2MasteringVoice_DisableEffect(IXAudio2MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) {
+ return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet);
+}
+static FORCEINLINE void IXAudio2MasteringVoice_GetEffectState(IXAudio2MasteringVoice* This,UINT32 EffectIndex,BOOL *pEnabled) {
+ This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled);
+}
+static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetEffectParameters(IXAudio2MasteringVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) {
+ return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet);
+}
+static FORCEINLINE HRESULT IXAudio2MasteringVoice_GetEffectParameters(IXAudio2MasteringVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) {
+ return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize);
+}
+static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetFilterParameters(IXAudio2MasteringVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio2MasteringVoice_GetFilterParameters(IXAudio2MasteringVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetFilterParameters(This,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetOutputFilterParameters(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet);
+}
+static FORCEINLINE void IXAudio2MasteringVoice_GetOutputFilterParameters(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) {
+ This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters);
+}
+static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetVolume(IXAudio2MasteringVoice* This,float Volume,UINT32 OperationSet) {
+ return This->lpVtbl->SetVolume(This,Volume,OperationSet);
+}
+static FORCEINLINE void IXAudio2MasteringVoice_GetVolume(IXAudio2MasteringVoice* This,float *pVolume) {
+ This->lpVtbl->GetVolume(This,pVolume);
+}
+static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetChannelVolumes(IXAudio2MasteringVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) {
+ return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet);
+}
+static FORCEINLINE void IXAudio2MasteringVoice_GetChannelVolumes(IXAudio2MasteringVoice* This,UINT32 Channels,float *pVolumes) {
+ This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes);
+}
+static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetOutputMatrix(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) {
+ return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet);
+}
+static FORCEINLINE void IXAudio2MasteringVoice_GetOutputMatrix(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) {
+ This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix);
+}
+static FORCEINLINE void IXAudio2MasteringVoice_DestroyVoice(IXAudio2MasteringVoice* This) {
+ This->lpVtbl->DestroyVoice(This);
+}
+/*** IXAudio2MasteringVoice methods ***/
+static FORCEINLINE void IXAudio2MasteringVoice_GetChannelMask(IXAudio2MasteringVoice* This,DWORD *pChannelMask) {
+ This->lpVtbl->GetChannelMask(This,pChannelMask);
+}
+#endif
+#endif
+
+#endif
+
+void STDMETHODCALLTYPE IXAudio2MasteringVoice_GetChannelMask_Proxy(
+ IXAudio2MasteringVoice* This,
+ DWORD *pChannelMask);
+void __RPC_STUB IXAudio2MasteringVoice_GetChannelMask_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio2MasteringVoice_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio20VoiceCallback interface
+ */
+#ifndef __IXAudio20VoiceCallback_INTERFACE_DEFINED__
+#define __IXAudio20VoiceCallback_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio20VoiceCallback
+{
+ BEGIN_INTERFACE
+
+ virtual void STDMETHODCALLTYPE OnVoiceProcessingPassStart(
+ ) = 0;
+
+ virtual void STDMETHODCALLTYPE OnVoiceProcessingPassEnd(
+ ) = 0;
+
+ virtual void STDMETHODCALLTYPE OnStreamEnd(
+ ) = 0;
+
+ virtual void STDMETHODCALLTYPE OnBufferStart(
+ void *pBufferContext) = 0;
+
+ virtual void STDMETHODCALLTYPE OnBufferEnd(
+ void *pBufferContext) = 0;
+
+ virtual void STDMETHODCALLTYPE OnLoopEnd(
+ void *pBufferContext) = 0;
+
+ virtual void STDMETHODCALLTYPE OnVoiceError(
+ void *pBuffercontext,
+ HRESULT Error) = 0;
+
+ END_INTERFACE
+};
+#else
+typedef struct IXAudio20VoiceCallbackVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio20VoiceCallback methods ***/
+ void (STDMETHODCALLTYPE *OnVoiceProcessingPassStart)(
+ IXAudio20VoiceCallback* This);
+
+ void (STDMETHODCALLTYPE *OnVoiceProcessingPassEnd)(
+ IXAudio20VoiceCallback* This);
+
+ void (STDMETHODCALLTYPE *OnStreamEnd)(
+ IXAudio20VoiceCallback* This);
+
+ void (STDMETHODCALLTYPE *OnBufferStart)(
+ IXAudio20VoiceCallback* This,
+ void *pBufferContext);
+
+ void (STDMETHODCALLTYPE *OnBufferEnd)(
+ IXAudio20VoiceCallback* This,
+ void *pBufferContext);
+
+ void (STDMETHODCALLTYPE *OnLoopEnd)(
+ IXAudio20VoiceCallback* This,
+ void *pBufferContext);
+
+ void (STDMETHODCALLTYPE *OnVoiceError)(
+ IXAudio20VoiceCallback* This,
+ void *pBuffercontext,
+ HRESULT Error);
+
+ END_INTERFACE
+} IXAudio20VoiceCallbackVtbl;
+interface IXAudio20VoiceCallback {
+ CONST_VTBL IXAudio20VoiceCallbackVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio20VoiceCallback methods ***/
+#define IXAudio20VoiceCallback_OnVoiceProcessingPassStart(This) (This)->lpVtbl->OnVoiceProcessingPassStart(This)
+#define IXAudio20VoiceCallback_OnVoiceProcessingPassEnd(This) (This)->lpVtbl->OnVoiceProcessingPassEnd(This)
+#define IXAudio20VoiceCallback_OnStreamEnd(This) (This)->lpVtbl->OnStreamEnd(This)
+#define IXAudio20VoiceCallback_OnBufferStart(This,pBufferContext) (This)->lpVtbl->OnBufferStart(This,pBufferContext)
+#define IXAudio20VoiceCallback_OnBufferEnd(This,pBufferContext) (This)->lpVtbl->OnBufferEnd(This,pBufferContext)
+#define IXAudio20VoiceCallback_OnLoopEnd(This,pBufferContext) (This)->lpVtbl->OnLoopEnd(This,pBufferContext)
+#define IXAudio20VoiceCallback_OnVoiceError(This,pBuffercontext,Error) (This)->lpVtbl->OnVoiceError(This,pBuffercontext,Error)
+#else
+/*** IXAudio20VoiceCallback methods ***/
+static FORCEINLINE void IXAudio20VoiceCallback_OnVoiceProcessingPassStart(IXAudio20VoiceCallback* This) {
+ This->lpVtbl->OnVoiceProcessingPassStart(This);
+}
+static FORCEINLINE void IXAudio20VoiceCallback_OnVoiceProcessingPassEnd(IXAudio20VoiceCallback* This) {
+ This->lpVtbl->OnVoiceProcessingPassEnd(This);
+}
+static FORCEINLINE void IXAudio20VoiceCallback_OnStreamEnd(IXAudio20VoiceCallback* This) {
+ This->lpVtbl->OnStreamEnd(This);
+}
+static FORCEINLINE void IXAudio20VoiceCallback_OnBufferStart(IXAudio20VoiceCallback* This,void *pBufferContext) {
+ This->lpVtbl->OnBufferStart(This,pBufferContext);
+}
+static FORCEINLINE void IXAudio20VoiceCallback_OnBufferEnd(IXAudio20VoiceCallback* This,void *pBufferContext) {
+ This->lpVtbl->OnBufferEnd(This,pBufferContext);
+}
+static FORCEINLINE void IXAudio20VoiceCallback_OnLoopEnd(IXAudio20VoiceCallback* This,void *pBufferContext) {
+ This->lpVtbl->OnLoopEnd(This,pBufferContext);
+}
+static FORCEINLINE void IXAudio20VoiceCallback_OnVoiceError(IXAudio20VoiceCallback* This,void *pBuffercontext,HRESULT Error) {
+ This->lpVtbl->OnVoiceError(This,pBuffercontext,Error);
+}
+#endif
+#endif
+
+#endif
+
+void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnVoiceProcessingPassStart_Proxy(
+ IXAudio20VoiceCallback* This);
+void __RPC_STUB IXAudio20VoiceCallback_OnVoiceProcessingPassStart_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnVoiceProcessingPassEnd_Proxy(
+ IXAudio20VoiceCallback* This);
+void __RPC_STUB IXAudio20VoiceCallback_OnVoiceProcessingPassEnd_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnStreamEnd_Proxy(
+ IXAudio20VoiceCallback* This);
+void __RPC_STUB IXAudio20VoiceCallback_OnStreamEnd_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnBufferStart_Proxy(
+ IXAudio20VoiceCallback* This,
+ void *pBufferContext);
+void __RPC_STUB IXAudio20VoiceCallback_OnBufferStart_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnBufferEnd_Proxy(
+ IXAudio20VoiceCallback* This,
+ void *pBufferContext);
+void __RPC_STUB IXAudio20VoiceCallback_OnBufferEnd_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnLoopEnd_Proxy(
+ IXAudio20VoiceCallback* This,
+ void *pBufferContext);
+void __RPC_STUB IXAudio20VoiceCallback_OnLoopEnd_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnVoiceError_Proxy(
+ IXAudio20VoiceCallback* This,
+ void *pBuffercontext,
+ HRESULT Error);
+void __RPC_STUB IXAudio20VoiceCallback_OnVoiceError_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio20VoiceCallback_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio2VoiceCallback interface
+ */
+#ifndef __IXAudio2VoiceCallback_INTERFACE_DEFINED__
+#define __IXAudio2VoiceCallback_INTERFACE_DEFINED__
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+interface IXAudio2VoiceCallback
+{
+ BEGIN_INTERFACE
+
+ virtual void STDMETHODCALLTYPE OnVoiceProcessingPassStart(
+ UINT32 BytesRequired) = 0;
+
+ virtual void STDMETHODCALLTYPE OnVoiceProcessingPassEnd(
+ ) = 0;
+
+ virtual void STDMETHODCALLTYPE OnStreamEnd(
+ ) = 0;
+
+ virtual void STDMETHODCALLTYPE OnBufferStart(
+ void *pBufferContext) = 0;
+
+ virtual void STDMETHODCALLTYPE OnBufferEnd(
+ void *pBufferContext) = 0;
+
+ virtual void STDMETHODCALLTYPE OnLoopEnd(
+ void *pBufferContext) = 0;
+
+ virtual void STDMETHODCALLTYPE OnVoiceError(
+ void *pBuffercontext,
+ HRESULT Error) = 0;
+
+ END_INTERFACE
+};
+#else
+typedef struct IXAudio2VoiceCallbackVtbl {
+ BEGIN_INTERFACE
+
+ /*** IXAudio2VoiceCallback methods ***/
+ void (STDMETHODCALLTYPE *OnVoiceProcessingPassStart)(
+ IXAudio2VoiceCallback* This,
+ UINT32 BytesRequired);
+
+ void (STDMETHODCALLTYPE *OnVoiceProcessingPassEnd)(
+ IXAudio2VoiceCallback* This);
+
+ void (STDMETHODCALLTYPE *OnStreamEnd)(
+ IXAudio2VoiceCallback* This);
+
+ void (STDMETHODCALLTYPE *OnBufferStart)(
+ IXAudio2VoiceCallback* This,
+ void *pBufferContext);
+
+ void (STDMETHODCALLTYPE *OnBufferEnd)(
+ IXAudio2VoiceCallback* This,
+ void *pBufferContext);
+
+ void (STDMETHODCALLTYPE *OnLoopEnd)(
+ IXAudio2VoiceCallback* This,
+ void *pBufferContext);
+
+ void (STDMETHODCALLTYPE *OnVoiceError)(
+ IXAudio2VoiceCallback* This,
+ void *pBuffercontext,
+ HRESULT Error);
+
+ END_INTERFACE
+} IXAudio2VoiceCallbackVtbl;
+interface IXAudio2VoiceCallback {
+ CONST_VTBL IXAudio2VoiceCallbackVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IXAudio2VoiceCallback methods ***/
+#define IXAudio2VoiceCallback_OnVoiceProcessingPassStart(This,BytesRequired) (This)->lpVtbl->OnVoiceProcessingPassStart(This,BytesRequired)
+#define IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(This) (This)->lpVtbl->OnVoiceProcessingPassEnd(This)
+#define IXAudio2VoiceCallback_OnStreamEnd(This) (This)->lpVtbl->OnStreamEnd(This)
+#define IXAudio2VoiceCallback_OnBufferStart(This,pBufferContext) (This)->lpVtbl->OnBufferStart(This,pBufferContext)
+#define IXAudio2VoiceCallback_OnBufferEnd(This,pBufferContext) (This)->lpVtbl->OnBufferEnd(This,pBufferContext)
+#define IXAudio2VoiceCallback_OnLoopEnd(This,pBufferContext) (This)->lpVtbl->OnLoopEnd(This,pBufferContext)
+#define IXAudio2VoiceCallback_OnVoiceError(This,pBuffercontext,Error) (This)->lpVtbl->OnVoiceError(This,pBuffercontext,Error)
+#else
+/*** IXAudio2VoiceCallback methods ***/
+static FORCEINLINE void IXAudio2VoiceCallback_OnVoiceProcessingPassStart(IXAudio2VoiceCallback* This,UINT32 BytesRequired) {
+ This->lpVtbl->OnVoiceProcessingPassStart(This,BytesRequired);
+}
+static FORCEINLINE void IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(IXAudio2VoiceCallback* This) {
+ This->lpVtbl->OnVoiceProcessingPassEnd(This);
+}
+static FORCEINLINE void IXAudio2VoiceCallback_OnStreamEnd(IXAudio2VoiceCallback* This) {
+ This->lpVtbl->OnStreamEnd(This);
+}
+static FORCEINLINE void IXAudio2VoiceCallback_OnBufferStart(IXAudio2VoiceCallback* This,void *pBufferContext) {
+ This->lpVtbl->OnBufferStart(This,pBufferContext);
+}
+static FORCEINLINE void IXAudio2VoiceCallback_OnBufferEnd(IXAudio2VoiceCallback* This,void *pBufferContext) {
+ This->lpVtbl->OnBufferEnd(This,pBufferContext);
+}
+static FORCEINLINE void IXAudio2VoiceCallback_OnLoopEnd(IXAudio2VoiceCallback* This,void *pBufferContext) {
+ This->lpVtbl->OnLoopEnd(This,pBufferContext);
+}
+static FORCEINLINE void IXAudio2VoiceCallback_OnVoiceError(IXAudio2VoiceCallback* This,void *pBuffercontext,HRESULT Error) {
+ This->lpVtbl->OnVoiceError(This,pBuffercontext,Error);
+}
+#endif
+#endif
+
+#endif
+
+void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnVoiceProcessingPassStart_Proxy(
+ IXAudio2VoiceCallback* This,
+ UINT32 BytesRequired);
+void __RPC_STUB IXAudio2VoiceCallback_OnVoiceProcessingPassStart_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnVoiceProcessingPassEnd_Proxy(
+ IXAudio2VoiceCallback* This);
+void __RPC_STUB IXAudio2VoiceCallback_OnVoiceProcessingPassEnd_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnStreamEnd_Proxy(
+ IXAudio2VoiceCallback* This);
+void __RPC_STUB IXAudio2VoiceCallback_OnStreamEnd_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnBufferStart_Proxy(
+ IXAudio2VoiceCallback* This,
+ void *pBufferContext);
+void __RPC_STUB IXAudio2VoiceCallback_OnBufferStart_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnBufferEnd_Proxy(
+ IXAudio2VoiceCallback* This,
+ void *pBufferContext);
+void __RPC_STUB IXAudio2VoiceCallback_OnBufferEnd_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnLoopEnd_Proxy(
+ IXAudio2VoiceCallback* This,
+ void *pBufferContext);
+void __RPC_STUB IXAudio2VoiceCallback_OnLoopEnd_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnVoiceError_Proxy(
+ IXAudio2VoiceCallback* This,
+ void *pBuffercontext,
+ HRESULT Error);
+void __RPC_STUB IXAudio2VoiceCallback_OnVoiceError_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio2VoiceCallback_INTERFACE_DEFINED__ */
+
+typedef struct XAUDIO2_DEBUG_CONFIGURATION {
+ UINT32 TraceMask;
+ UINT32 BreakMask;
+ BOOL LogThreadID;
+ BOOL LogFileline;
+ BOOL LogFunctionName;
+ BOOL LogTiming;
+} XAUDIO2_DEBUG_CONFIGURATION;
+/*****************************************************************************
+ * IXAudio20 interface
+ */
+#ifndef __IXAudio20_INTERFACE_DEFINED__
+#define __IXAudio20_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IXAudio20, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("8bcf1f58-9fe7-4583-8ac6-e2adc465c8bb")
+IXAudio20 : public IUnknown
+{
+ virtual HRESULT STDMETHODCALLTYPE GetDeviceCount(
+ UINT32 *pCount) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDeviceDetails(
+ UINT32 Index,
+ XAUDIO2_DEVICE_DETAILS *pDeviceDetails) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Initialize(
+ UINT32 Flags = 0,
+ XAUDIO2_PROCESSOR XAudio2Processor = XAUDIO2_DEFAULT_PROCESSOR) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RegisterForCallbacks(
+ IXAudio2EngineCallback *pCallback) = 0;
+
+ virtual void STDMETHODCALLTYPE UnregisterForCallbacks(
+ IXAudio2EngineCallback *pCallback) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSourceVoice(
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags = 0,
+ float MaxFrequencyRatio = XAUDIO2_DEFAULT_FREQ_RATIO,
+ IXAudio2VoiceCallback *pCallback = 0,
+ const XAUDIO2_VOICE_SENDS *pSendList = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSubmixVoice(
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags = 0,
+ UINT32 ProcessingStage = 0,
+ const XAUDIO2_VOICE_SENDS *pSendList = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateMasteringVoice(
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels = XAUDIO2_DEFAULT_CHANNELS,
+ UINT32 InputSampleRate = XAUDIO2_DEFAULT_SAMPLERATE,
+ UINT32 Flags = 0,
+ UINT32 DeviceIndex = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE StartEngine(
+ ) = 0;
+
+ virtual void STDMETHODCALLTYPE StopEngine(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CommitChanges(
+ UINT32 OperationSet) = 0;
+
+ virtual void STDMETHODCALLTYPE GetPerformanceData(
+ XAUDIO20_PERFORMANCE_DATA *pPerfData) = 0;
+
+ virtual void STDMETHODCALLTYPE SetDebugConfiguration(
+ const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,
+ void *pReserved = 0) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(IXAudio20, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb)
+#endif
+#else
+typedef struct IXAudio20Vtbl {
+ BEGIN_INTERFACE
+
+ /*** IUnknown methods ***/
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+ IXAudio20* This,
+ REFIID riid,
+ void **ppvObject);
+
+ ULONG (STDMETHODCALLTYPE *AddRef)(
+ IXAudio20* This);
+
+ ULONG (STDMETHODCALLTYPE *Release)(
+ IXAudio20* This);
+
+ /*** IXAudio20 methods ***/
+ HRESULT (STDMETHODCALLTYPE *GetDeviceCount)(
+ IXAudio20* This,
+ UINT32 *pCount);
+
+ HRESULT (STDMETHODCALLTYPE *GetDeviceDetails)(
+ IXAudio20* This,
+ UINT32 Index,
+ XAUDIO2_DEVICE_DETAILS *pDeviceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *Initialize)(
+ IXAudio20* This,
+ UINT32 Flags,
+ XAUDIO2_PROCESSOR XAudio2Processor);
+
+ HRESULT (STDMETHODCALLTYPE *RegisterForCallbacks)(
+ IXAudio20* This,
+ IXAudio2EngineCallback *pCallback);
+
+ void (STDMETHODCALLTYPE *UnregisterForCallbacks)(
+ IXAudio20* This,
+ IXAudio2EngineCallback *pCallback);
+
+ HRESULT (STDMETHODCALLTYPE *CreateSourceVoice)(
+ IXAudio20* This,
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags,
+ float MaxFrequencyRatio,
+ IXAudio2VoiceCallback *pCallback,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *CreateSubmixVoice)(
+ IXAudio20* This,
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 ProcessingStage,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *CreateMasteringVoice)(
+ IXAudio20* This,
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 DeviceIndex,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *StartEngine)(
+ IXAudio20* This);
+
+ void (STDMETHODCALLTYPE *StopEngine)(
+ IXAudio20* This);
+
+ HRESULT (STDMETHODCALLTYPE *CommitChanges)(
+ IXAudio20* This,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetPerformanceData)(
+ IXAudio20* This,
+ XAUDIO20_PERFORMANCE_DATA *pPerfData);
+
+ void (STDMETHODCALLTYPE *SetDebugConfiguration)(
+ IXAudio20* This,
+ const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,
+ void *pReserved);
+
+ END_INTERFACE
+} IXAudio20Vtbl;
+interface IXAudio20 {
+ CONST_VTBL IXAudio20Vtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define IXAudio20_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IXAudio20_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IXAudio20_Release(This) (This)->lpVtbl->Release(This)
+/*** IXAudio20 methods ***/
+#define IXAudio20_GetDeviceCount(This,pCount) (This)->lpVtbl->GetDeviceCount(This,pCount)
+#define IXAudio20_GetDeviceDetails(This,Index,pDeviceDetails) (This)->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails)
+#define IXAudio20_Initialize(This,Flags,XAudio2Processor) (This)->lpVtbl->Initialize(This,Flags,XAudio2Processor)
+#define IXAudio20_RegisterForCallbacks(This,pCallback) (This)->lpVtbl->RegisterForCallbacks(This,pCallback)
+#define IXAudio20_UnregisterForCallbacks(This,pCallback) (This)->lpVtbl->UnregisterForCallbacks(This,pCallback)
+#define IXAudio20_CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (This)->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
+#define IXAudio20_CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) (This)->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain)
+#define IXAudio20_CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (This)->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain)
+#define IXAudio20_StartEngine(This) (This)->lpVtbl->StartEngine(This)
+#define IXAudio20_StopEngine(This) (This)->lpVtbl->StopEngine(This)
+#define IXAudio20_CommitChanges(This,OperationSet) (This)->lpVtbl->CommitChanges(This,OperationSet)
+#define IXAudio20_GetPerformanceData(This,pPerfData) (This)->lpVtbl->GetPerformanceData(This,pPerfData)
+#define IXAudio20_SetDebugConfiguration(This,pDebugConfiguration,pReserved) (This)->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT IXAudio20_QueryInterface(IXAudio20* This,REFIID riid,void **ppvObject) {
+ return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG IXAudio20_AddRef(IXAudio20* This) {
+ return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG IXAudio20_Release(IXAudio20* This) {
+ return This->lpVtbl->Release(This);
+}
+/*** IXAudio20 methods ***/
+static FORCEINLINE HRESULT IXAudio20_GetDeviceCount(IXAudio20* This,UINT32 *pCount) {
+ return This->lpVtbl->GetDeviceCount(This,pCount);
+}
+static FORCEINLINE HRESULT IXAudio20_GetDeviceDetails(IXAudio20* This,UINT32 Index,XAUDIO2_DEVICE_DETAILS *pDeviceDetails) {
+ return This->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails);
+}
+static FORCEINLINE HRESULT IXAudio20_Initialize(IXAudio20* This,UINT32 Flags,XAUDIO2_PROCESSOR XAudio2Processor) {
+ return This->lpVtbl->Initialize(This,Flags,XAudio2Processor);
+}
+static FORCEINLINE HRESULT IXAudio20_RegisterForCallbacks(IXAudio20* This,IXAudio2EngineCallback *pCallback) {
+ return This->lpVtbl->RegisterForCallbacks(This,pCallback);
+}
+static FORCEINLINE void IXAudio20_UnregisterForCallbacks(IXAudio20* This,IXAudio2EngineCallback *pCallback) {
+ This->lpVtbl->UnregisterForCallbacks(This,pCallback);
+}
+static FORCEINLINE HRESULT IXAudio20_CreateSourceVoice(IXAudio20* This,IXAudio2SourceVoice **ppSourceVoice,const WAVEFORMATEX *pSourceFormat,UINT32 Flags,float MaxFrequencyRatio,IXAudio2VoiceCallback *pCallback,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio20_CreateSubmixVoice(IXAudio20* This,IXAudio2SubmixVoice **ppSubmixVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 ProcessingStage,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio20_CreateMasteringVoice(IXAudio20* This,IXAudio2MasteringVoice **ppMasteringVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 DeviceIndex,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio20_StartEngine(IXAudio20* This) {
+ return This->lpVtbl->StartEngine(This);
+}
+static FORCEINLINE void IXAudio20_StopEngine(IXAudio20* This) {
+ This->lpVtbl->StopEngine(This);
+}
+static FORCEINLINE HRESULT IXAudio20_CommitChanges(IXAudio20* This,UINT32 OperationSet) {
+ return This->lpVtbl->CommitChanges(This,OperationSet);
+}
+static FORCEINLINE void IXAudio20_GetPerformanceData(IXAudio20* This,XAUDIO20_PERFORMANCE_DATA *pPerfData) {
+ This->lpVtbl->GetPerformanceData(This,pPerfData);
+}
+static FORCEINLINE void IXAudio20_SetDebugConfiguration(IXAudio20* This,const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,void *pReserved) {
+ This->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IXAudio20_GetDeviceCount_Proxy(
+ IXAudio20* This,
+ UINT32 *pCount);
+void __RPC_STUB IXAudio20_GetDeviceCount_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20_GetDeviceDetails_Proxy(
+ IXAudio20* This,
+ UINT32 Index,
+ XAUDIO2_DEVICE_DETAILS *pDeviceDetails);
+void __RPC_STUB IXAudio20_GetDeviceDetails_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20_Initialize_Proxy(
+ IXAudio20* This,
+ UINT32 Flags,
+ XAUDIO2_PROCESSOR XAudio2Processor);
+void __RPC_STUB IXAudio20_Initialize_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20_RegisterForCallbacks_Proxy(
+ IXAudio20* This,
+ IXAudio2EngineCallback *pCallback);
+void __RPC_STUB IXAudio20_RegisterForCallbacks_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20_UnregisterForCallbacks_Proxy(
+ IXAudio20* This,
+ IXAudio2EngineCallback *pCallback);
+void __RPC_STUB IXAudio20_UnregisterForCallbacks_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20_CreateSourceVoice_Proxy(
+ IXAudio20* This,
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags,
+ float MaxFrequencyRatio,
+ IXAudio2VoiceCallback *pCallback,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio20_CreateSourceVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20_CreateSubmixVoice_Proxy(
+ IXAudio20* This,
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 ProcessingStage,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio20_CreateSubmixVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20_CreateMasteringVoice_Proxy(
+ IXAudio20* This,
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 DeviceIndex,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio20_CreateMasteringVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20_StartEngine_Proxy(
+ IXAudio20* This);
+void __RPC_STUB IXAudio20_StartEngine_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20_StopEngine_Proxy(
+ IXAudio20* This);
+void __RPC_STUB IXAudio20_StopEngine_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio20_CommitChanges_Proxy(
+ IXAudio20* This,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio20_CommitChanges_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio20_GetPerformanceData_Proxy(
+ IXAudio20* This,
+ XAUDIO20_PERFORMANCE_DATA *pPerfData);
+void __RPC_STUB IXAudio20_GetPerformanceData_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio20_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio22 interface
+ */
+#ifndef __IXAudio22_INTERFACE_DEFINED__
+#define __IXAudio22_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IXAudio22, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("8bcf1f58-9fe7-4583-8ac6-e2adc465c8bb")
+IXAudio22 : public IUnknown
+{
+ virtual HRESULT STDMETHODCALLTYPE GetDeviceCount(
+ UINT32 *pCount) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDeviceDetails(
+ UINT32 Index,
+ XAUDIO2_DEVICE_DETAILS *pDeviceDetails) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Initialize(
+ UINT32 Flags = 0,
+ XAUDIO2_PROCESSOR XAudio2Processor = XAUDIO2_DEFAULT_PROCESSOR) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RegisterForCallbacks(
+ IXAudio2EngineCallback *pCallback) = 0;
+
+ virtual void STDMETHODCALLTYPE UnregisterForCallbacks(
+ IXAudio2EngineCallback *pCallback) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSourceVoice(
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags = 0,
+ float MaxFrequencyRatio = XAUDIO2_DEFAULT_FREQ_RATIO,
+ IXAudio2VoiceCallback *pCallback = 0,
+ const XAUDIO2_VOICE_SENDS *pSendList = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSubmixVoice(
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags = 0,
+ UINT32 ProcessingStage = 0,
+ const XAUDIO2_VOICE_SENDS *pSendList = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateMasteringVoice(
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels = XAUDIO2_DEFAULT_CHANNELS,
+ UINT32 InputSampleRate = XAUDIO2_DEFAULT_SAMPLERATE,
+ UINT32 Flags = 0,
+ UINT32 DeviceIndex = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE StartEngine(
+ ) = 0;
+
+ virtual void STDMETHODCALLTYPE StopEngine(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CommitChanges(
+ UINT32 OperationSet) = 0;
+
+ virtual void STDMETHODCALLTYPE GetPerformanceData(
+ XAUDIO22_PERFORMANCE_DATA *pPerfData) = 0;
+
+ virtual void STDMETHODCALLTYPE SetDebugConfiguration(
+ const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,
+ void *pReserved = 0) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(IXAudio22, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb)
+#endif
+#else
+typedef struct IXAudio22Vtbl {
+ BEGIN_INTERFACE
+
+ /*** IUnknown methods ***/
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+ IXAudio22* This,
+ REFIID riid,
+ void **ppvObject);
+
+ ULONG (STDMETHODCALLTYPE *AddRef)(
+ IXAudio22* This);
+
+ ULONG (STDMETHODCALLTYPE *Release)(
+ IXAudio22* This);
+
+ /*** IXAudio22 methods ***/
+ HRESULT (STDMETHODCALLTYPE *GetDeviceCount)(
+ IXAudio22* This,
+ UINT32 *pCount);
+
+ HRESULT (STDMETHODCALLTYPE *GetDeviceDetails)(
+ IXAudio22* This,
+ UINT32 Index,
+ XAUDIO2_DEVICE_DETAILS *pDeviceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *Initialize)(
+ IXAudio22* This,
+ UINT32 Flags,
+ XAUDIO2_PROCESSOR XAudio2Processor);
+
+ HRESULT (STDMETHODCALLTYPE *RegisterForCallbacks)(
+ IXAudio22* This,
+ IXAudio2EngineCallback *pCallback);
+
+ void (STDMETHODCALLTYPE *UnregisterForCallbacks)(
+ IXAudio22* This,
+ IXAudio2EngineCallback *pCallback);
+
+ HRESULT (STDMETHODCALLTYPE *CreateSourceVoice)(
+ IXAudio22* This,
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags,
+ float MaxFrequencyRatio,
+ IXAudio2VoiceCallback *pCallback,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *CreateSubmixVoice)(
+ IXAudio22* This,
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 ProcessingStage,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *CreateMasteringVoice)(
+ IXAudio22* This,
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 DeviceIndex,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *StartEngine)(
+ IXAudio22* This);
+
+ void (STDMETHODCALLTYPE *StopEngine)(
+ IXAudio22* This);
+
+ HRESULT (STDMETHODCALLTYPE *CommitChanges)(
+ IXAudio22* This,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetPerformanceData)(
+ IXAudio22* This,
+ XAUDIO22_PERFORMANCE_DATA *pPerfData);
+
+ void (STDMETHODCALLTYPE *SetDebugConfiguration)(
+ IXAudio22* This,
+ const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,
+ void *pReserved);
+
+ END_INTERFACE
+} IXAudio22Vtbl;
+interface IXAudio22 {
+ CONST_VTBL IXAudio22Vtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define IXAudio22_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IXAudio22_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IXAudio22_Release(This) (This)->lpVtbl->Release(This)
+/*** IXAudio22 methods ***/
+#define IXAudio22_GetDeviceCount(This,pCount) (This)->lpVtbl->GetDeviceCount(This,pCount)
+#define IXAudio22_GetDeviceDetails(This,Index,pDeviceDetails) (This)->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails)
+#define IXAudio22_Initialize(This,Flags,XAudio2Processor) (This)->lpVtbl->Initialize(This,Flags,XAudio2Processor)
+#define IXAudio22_RegisterForCallbacks(This,pCallback) (This)->lpVtbl->RegisterForCallbacks(This,pCallback)
+#define IXAudio22_UnregisterForCallbacks(This,pCallback) (This)->lpVtbl->UnregisterForCallbacks(This,pCallback)
+#define IXAudio22_CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (This)->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
+#define IXAudio22_CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) (This)->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain)
+#define IXAudio22_CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (This)->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain)
+#define IXAudio22_StartEngine(This) (This)->lpVtbl->StartEngine(This)
+#define IXAudio22_StopEngine(This) (This)->lpVtbl->StopEngine(This)
+#define IXAudio22_CommitChanges(This,OperationSet) (This)->lpVtbl->CommitChanges(This,OperationSet)
+#define IXAudio22_GetPerformanceData(This,pPerfData) (This)->lpVtbl->GetPerformanceData(This,pPerfData)
+#define IXAudio22_SetDebugConfiguration(This,pDebugConfiguration,pReserved) (This)->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT IXAudio22_QueryInterface(IXAudio22* This,REFIID riid,void **ppvObject) {
+ return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG IXAudio22_AddRef(IXAudio22* This) {
+ return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG IXAudio22_Release(IXAudio22* This) {
+ return This->lpVtbl->Release(This);
+}
+/*** IXAudio22 methods ***/
+static FORCEINLINE HRESULT IXAudio22_GetDeviceCount(IXAudio22* This,UINT32 *pCount) {
+ return This->lpVtbl->GetDeviceCount(This,pCount);
+}
+static FORCEINLINE HRESULT IXAudio22_GetDeviceDetails(IXAudio22* This,UINT32 Index,XAUDIO2_DEVICE_DETAILS *pDeviceDetails) {
+ return This->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails);
+}
+static FORCEINLINE HRESULT IXAudio22_Initialize(IXAudio22* This,UINT32 Flags,XAUDIO2_PROCESSOR XAudio2Processor) {
+ return This->lpVtbl->Initialize(This,Flags,XAudio2Processor);
+}
+static FORCEINLINE HRESULT IXAudio22_RegisterForCallbacks(IXAudio22* This,IXAudio2EngineCallback *pCallback) {
+ return This->lpVtbl->RegisterForCallbacks(This,pCallback);
+}
+static FORCEINLINE void IXAudio22_UnregisterForCallbacks(IXAudio22* This,IXAudio2EngineCallback *pCallback) {
+ This->lpVtbl->UnregisterForCallbacks(This,pCallback);
+}
+static FORCEINLINE HRESULT IXAudio22_CreateSourceVoice(IXAudio22* This,IXAudio2SourceVoice **ppSourceVoice,const WAVEFORMATEX *pSourceFormat,UINT32 Flags,float MaxFrequencyRatio,IXAudio2VoiceCallback *pCallback,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio22_CreateSubmixVoice(IXAudio22* This,IXAudio2SubmixVoice **ppSubmixVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 ProcessingStage,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio22_CreateMasteringVoice(IXAudio22* This,IXAudio2MasteringVoice **ppMasteringVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 DeviceIndex,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio22_StartEngine(IXAudio22* This) {
+ return This->lpVtbl->StartEngine(This);
+}
+static FORCEINLINE void IXAudio22_StopEngine(IXAudio22* This) {
+ This->lpVtbl->StopEngine(This);
+}
+static FORCEINLINE HRESULT IXAudio22_CommitChanges(IXAudio22* This,UINT32 OperationSet) {
+ return This->lpVtbl->CommitChanges(This,OperationSet);
+}
+static FORCEINLINE void IXAudio22_GetPerformanceData(IXAudio22* This,XAUDIO22_PERFORMANCE_DATA *pPerfData) {
+ This->lpVtbl->GetPerformanceData(This,pPerfData);
+}
+static FORCEINLINE void IXAudio22_SetDebugConfiguration(IXAudio22* This,const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,void *pReserved) {
+ This->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IXAudio22_GetDeviceCount_Proxy(
+ IXAudio22* This,
+ UINT32 *pCount);
+void __RPC_STUB IXAudio22_GetDeviceCount_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio22_GetDeviceDetails_Proxy(
+ IXAudio22* This,
+ UINT32 Index,
+ XAUDIO2_DEVICE_DETAILS *pDeviceDetails);
+void __RPC_STUB IXAudio22_GetDeviceDetails_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio22_Initialize_Proxy(
+ IXAudio22* This,
+ UINT32 Flags,
+ XAUDIO2_PROCESSOR XAudio2Processor);
+void __RPC_STUB IXAudio22_Initialize_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio22_RegisterForCallbacks_Proxy(
+ IXAudio22* This,
+ IXAudio2EngineCallback *pCallback);
+void __RPC_STUB IXAudio22_RegisterForCallbacks_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio22_UnregisterForCallbacks_Proxy(
+ IXAudio22* This,
+ IXAudio2EngineCallback *pCallback);
+void __RPC_STUB IXAudio22_UnregisterForCallbacks_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio22_CreateSourceVoice_Proxy(
+ IXAudio22* This,
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags,
+ float MaxFrequencyRatio,
+ IXAudio2VoiceCallback *pCallback,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio22_CreateSourceVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio22_CreateSubmixVoice_Proxy(
+ IXAudio22* This,
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 ProcessingStage,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio22_CreateSubmixVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio22_CreateMasteringVoice_Proxy(
+ IXAudio22* This,
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 DeviceIndex,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio22_CreateMasteringVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio22_StartEngine_Proxy(
+ IXAudio22* This);
+void __RPC_STUB IXAudio22_StartEngine_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio22_StopEngine_Proxy(
+ IXAudio22* This);
+void __RPC_STUB IXAudio22_StopEngine_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio22_CommitChanges_Proxy(
+ IXAudio22* This,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio22_CommitChanges_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio22_GetPerformanceData_Proxy(
+ IXAudio22* This,
+ XAUDIO22_PERFORMANCE_DATA *pPerfData);
+void __RPC_STUB IXAudio22_GetPerformanceData_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio22_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IXAudio27 interface
+ */
+#ifndef __IXAudio27_INTERFACE_DEFINED__
+#define __IXAudio27_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IXAudio27, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("8bcf1f58-9fe7-4583-8ac6-e2adc465c8bb")
+IXAudio27 : public IUnknown
+{
+ virtual HRESULT STDMETHODCALLTYPE GetDeviceCount(
+ UINT32 *pCount) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDeviceDetails(
+ UINT32 Index,
+ XAUDIO2_DEVICE_DETAILS *pDeviceDetails) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Initialize(
+ UINT32 Flags = 0,
+ XAUDIO2_PROCESSOR XAudio2Processor = XAUDIO2_DEFAULT_PROCESSOR) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RegisterForCallbacks(
+ IXAudio2EngineCallback *pCallback) = 0;
+
+ virtual void STDMETHODCALLTYPE UnregisterForCallbacks(
+ IXAudio2EngineCallback *pCallback) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSourceVoice(
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags = 0,
+ float MaxFrequencyRatio = XAUDIO2_DEFAULT_FREQ_RATIO,
+ IXAudio2VoiceCallback *pCallback = 0,
+ const XAUDIO2_VOICE_SENDS *pSendList = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSubmixVoice(
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags = 0,
+ UINT32 ProcessingStage = 0,
+ const XAUDIO2_VOICE_SENDS *pSendList = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateMasteringVoice(
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels = XAUDIO2_DEFAULT_CHANNELS,
+ UINT32 InputSampleRate = XAUDIO2_DEFAULT_SAMPLERATE,
+ UINT32 Flags = 0,
+ UINT32 DeviceIndex = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE StartEngine(
+ ) = 0;
+
+ virtual void STDMETHODCALLTYPE StopEngine(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CommitChanges(
+ UINT32 OperationSet) = 0;
+
+ virtual void STDMETHODCALLTYPE GetPerformanceData(
+ XAUDIO2_PERFORMANCE_DATA *pPerfData) = 0;
+
+ virtual void STDMETHODCALLTYPE SetDebugConfiguration(
+ const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,
+ void *pReserved = 0) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(IXAudio27, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb)
+#endif
+#else
+typedef struct IXAudio27Vtbl {
+ BEGIN_INTERFACE
+
+ /*** IUnknown methods ***/
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+ IXAudio27* This,
+ REFIID riid,
+ void **ppvObject);
+
+ ULONG (STDMETHODCALLTYPE *AddRef)(
+ IXAudio27* This);
+
+ ULONG (STDMETHODCALLTYPE *Release)(
+ IXAudio27* This);
+
+ /*** IXAudio27 methods ***/
+ HRESULT (STDMETHODCALLTYPE *GetDeviceCount)(
+ IXAudio27* This,
+ UINT32 *pCount);
+
+ HRESULT (STDMETHODCALLTYPE *GetDeviceDetails)(
+ IXAudio27* This,
+ UINT32 Index,
+ XAUDIO2_DEVICE_DETAILS *pDeviceDetails);
+
+ HRESULT (STDMETHODCALLTYPE *Initialize)(
+ IXAudio27* This,
+ UINT32 Flags,
+ XAUDIO2_PROCESSOR XAudio2Processor);
+
+ HRESULT (STDMETHODCALLTYPE *RegisterForCallbacks)(
+ IXAudio27* This,
+ IXAudio2EngineCallback *pCallback);
+
+ void (STDMETHODCALLTYPE *UnregisterForCallbacks)(
+ IXAudio27* This,
+ IXAudio2EngineCallback *pCallback);
+
+ HRESULT (STDMETHODCALLTYPE *CreateSourceVoice)(
+ IXAudio27* This,
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags,
+ float MaxFrequencyRatio,
+ IXAudio2VoiceCallback *pCallback,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *CreateSubmixVoice)(
+ IXAudio27* This,
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 ProcessingStage,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *CreateMasteringVoice)(
+ IXAudio27* This,
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 DeviceIndex,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *StartEngine)(
+ IXAudio27* This);
+
+ void (STDMETHODCALLTYPE *StopEngine)(
+ IXAudio27* This);
+
+ HRESULT (STDMETHODCALLTYPE *CommitChanges)(
+ IXAudio27* This,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetPerformanceData)(
+ IXAudio27* This,
+ XAUDIO2_PERFORMANCE_DATA *pPerfData);
+
+ void (STDMETHODCALLTYPE *SetDebugConfiguration)(
+ IXAudio27* This,
+ const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,
+ void *pReserved);
+
+ END_INTERFACE
+} IXAudio27Vtbl;
+interface IXAudio27 {
+ CONST_VTBL IXAudio27Vtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define IXAudio27_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IXAudio27_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IXAudio27_Release(This) (This)->lpVtbl->Release(This)
+/*** IXAudio27 methods ***/
+#define IXAudio27_GetDeviceCount(This,pCount) (This)->lpVtbl->GetDeviceCount(This,pCount)
+#define IXAudio27_GetDeviceDetails(This,Index,pDeviceDetails) (This)->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails)
+#define IXAudio27_Initialize(This,Flags,XAudio2Processor) (This)->lpVtbl->Initialize(This,Flags,XAudio2Processor)
+#define IXAudio27_RegisterForCallbacks(This,pCallback) (This)->lpVtbl->RegisterForCallbacks(This,pCallback)
+#define IXAudio27_UnregisterForCallbacks(This,pCallback) (This)->lpVtbl->UnregisterForCallbacks(This,pCallback)
+#define IXAudio27_CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (This)->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
+#define IXAudio27_CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) (This)->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain)
+#define IXAudio27_CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (This)->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain)
+#define IXAudio27_StartEngine(This) (This)->lpVtbl->StartEngine(This)
+#define IXAudio27_StopEngine(This) (This)->lpVtbl->StopEngine(This)
+#define IXAudio27_CommitChanges(This,OperationSet) (This)->lpVtbl->CommitChanges(This,OperationSet)
+#define IXAudio27_GetPerformanceData(This,pPerfData) (This)->lpVtbl->GetPerformanceData(This,pPerfData)
+#define IXAudio27_SetDebugConfiguration(This,pDebugConfiguration,pReserved) (This)->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT IXAudio27_QueryInterface(IXAudio27* This,REFIID riid,void **ppvObject) {
+ return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG IXAudio27_AddRef(IXAudio27* This) {
+ return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG IXAudio27_Release(IXAudio27* This) {
+ return This->lpVtbl->Release(This);
+}
+/*** IXAudio27 methods ***/
+static FORCEINLINE HRESULT IXAudio27_GetDeviceCount(IXAudio27* This,UINT32 *pCount) {
+ return This->lpVtbl->GetDeviceCount(This,pCount);
+}
+static FORCEINLINE HRESULT IXAudio27_GetDeviceDetails(IXAudio27* This,UINT32 Index,XAUDIO2_DEVICE_DETAILS *pDeviceDetails) {
+ return This->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails);
+}
+static FORCEINLINE HRESULT IXAudio27_Initialize(IXAudio27* This,UINT32 Flags,XAUDIO2_PROCESSOR XAudio2Processor) {
+ return This->lpVtbl->Initialize(This,Flags,XAudio2Processor);
+}
+static FORCEINLINE HRESULT IXAudio27_RegisterForCallbacks(IXAudio27* This,IXAudio2EngineCallback *pCallback) {
+ return This->lpVtbl->RegisterForCallbacks(This,pCallback);
+}
+static FORCEINLINE void IXAudio27_UnregisterForCallbacks(IXAudio27* This,IXAudio2EngineCallback *pCallback) {
+ This->lpVtbl->UnregisterForCallbacks(This,pCallback);
+}
+static FORCEINLINE HRESULT IXAudio27_CreateSourceVoice(IXAudio27* This,IXAudio2SourceVoice **ppSourceVoice,const WAVEFORMATEX *pSourceFormat,UINT32 Flags,float MaxFrequencyRatio,IXAudio2VoiceCallback *pCallback,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio27_CreateSubmixVoice(IXAudio27* This,IXAudio2SubmixVoice **ppSubmixVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 ProcessingStage,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio27_CreateMasteringVoice(IXAudio27* This,IXAudio2MasteringVoice **ppMasteringVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 DeviceIndex,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio27_StartEngine(IXAudio27* This) {
+ return This->lpVtbl->StartEngine(This);
+}
+static FORCEINLINE void IXAudio27_StopEngine(IXAudio27* This) {
+ This->lpVtbl->StopEngine(This);
+}
+static FORCEINLINE HRESULT IXAudio27_CommitChanges(IXAudio27* This,UINT32 OperationSet) {
+ return This->lpVtbl->CommitChanges(This,OperationSet);
+}
+static FORCEINLINE void IXAudio27_GetPerformanceData(IXAudio27* This,XAUDIO2_PERFORMANCE_DATA *pPerfData) {
+ This->lpVtbl->GetPerformanceData(This,pPerfData);
+}
+static FORCEINLINE void IXAudio27_SetDebugConfiguration(IXAudio27* This,const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,void *pReserved) {
+ This->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IXAudio27_GetDeviceCount_Proxy(
+ IXAudio27* This,
+ UINT32 *pCount);
+void __RPC_STUB IXAudio27_GetDeviceCount_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27_GetDeviceDetails_Proxy(
+ IXAudio27* This,
+ UINT32 Index,
+ XAUDIO2_DEVICE_DETAILS *pDeviceDetails);
+void __RPC_STUB IXAudio27_GetDeviceDetails_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27_Initialize_Proxy(
+ IXAudio27* This,
+ UINT32 Flags,
+ XAUDIO2_PROCESSOR XAudio2Processor);
+void __RPC_STUB IXAudio27_Initialize_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27_RegisterForCallbacks_Proxy(
+ IXAudio27* This,
+ IXAudio2EngineCallback *pCallback);
+void __RPC_STUB IXAudio27_RegisterForCallbacks_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio27_UnregisterForCallbacks_Proxy(
+ IXAudio27* This,
+ IXAudio2EngineCallback *pCallback);
+void __RPC_STUB IXAudio27_UnregisterForCallbacks_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27_CreateSourceVoice_Proxy(
+ IXAudio27* This,
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags,
+ float MaxFrequencyRatio,
+ IXAudio2VoiceCallback *pCallback,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio27_CreateSourceVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27_CreateSubmixVoice_Proxy(
+ IXAudio27* This,
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 ProcessingStage,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio27_CreateSubmixVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27_CreateMasteringVoice_Proxy(
+ IXAudio27* This,
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 DeviceIndex,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio27_CreateMasteringVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27_StartEngine_Proxy(
+ IXAudio27* This);
+void __RPC_STUB IXAudio27_StartEngine_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio27_StopEngine_Proxy(
+ IXAudio27* This);
+void __RPC_STUB IXAudio27_StopEngine_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio27_CommitChanges_Proxy(
+ IXAudio27* This,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio27_CommitChanges_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio27_GetPerformanceData_Proxy(
+ IXAudio27* This,
+ XAUDIO2_PERFORMANCE_DATA *pPerfData);
+void __RPC_STUB IXAudio27_GetPerformanceData_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio27_INTERFACE_DEFINED__ */
+
+DEFINE_GUID(IID_IXAudio28, 0x60d8dac8, 0x5aa1, 0x4e8e, 0xb5, 0x97, 0x2f, 0x5e, 0x28, 0x83, 0xd4, 0x84);
+/*****************************************************************************
+ * IXAudio2 interface
+ */
+#ifndef __IXAudio2_INTERFACE_DEFINED__
+#define __IXAudio2_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IXAudio2, 0x2b02e3cf, 0x2e0b, 0x4ec3, 0xbe,0x45, 0x1b,0x2a,0x3f,0xe7,0x21,0x0d);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("2b02e3cf-2e0b-4ec3-be45-1b2a3fe7210d")
+IXAudio2 : public IUnknown
+{
+ virtual HRESULT STDMETHODCALLTYPE RegisterForCallbacks(
+ IXAudio2EngineCallback *pCallback) = 0;
+
+ virtual void STDMETHODCALLTYPE UnregisterForCallbacks(
+ IXAudio2EngineCallback *pCallback) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSourceVoice(
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags = 0,
+ float MaxFrequencyRatio = XAUDIO2_DEFAULT_FREQ_RATIO,
+ IXAudio2VoiceCallback *pCallback = 0,
+ const XAUDIO2_VOICE_SENDS *pSendList = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateSubmixVoice(
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags = 0,
+ UINT32 ProcessingStage = 0,
+ const XAUDIO2_VOICE_SENDS *pSendList = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CreateMasteringVoice(
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels = XAUDIO2_DEFAULT_CHANNELS,
+ UINT32 InputSampleRate = XAUDIO2_DEFAULT_SAMPLERATE,
+ UINT32 Flags = 0,
+ LPCWSTR DeviceId = 0,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0,
+ AUDIO_STREAM_CATEGORY StreamCategory = AudioCategory_GameEffects) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE StartEngine(
+ ) = 0;
+
+ virtual void STDMETHODCALLTYPE StopEngine(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE CommitChanges(
+ UINT32 OperationSet) = 0;
+
+ virtual void STDMETHODCALLTYPE GetPerformanceData(
+ XAUDIO2_PERFORMANCE_DATA *pPerfData) = 0;
+
+ virtual void STDMETHODCALLTYPE SetDebugConfiguration(
+ const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,
+ void *pReserved = 0) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(IXAudio2, 0x2b02e3cf, 0x2e0b, 0x4ec3, 0xbe,0x45, 0x1b,0x2a,0x3f,0xe7,0x21,0x0d)
+#endif
+#else
+typedef struct IXAudio2Vtbl {
+ BEGIN_INTERFACE
+
+ /*** IUnknown methods ***/
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+ IXAudio2* This,
+ REFIID riid,
+ void **ppvObject);
+
+ ULONG (STDMETHODCALLTYPE *AddRef)(
+ IXAudio2* This);
+
+ ULONG (STDMETHODCALLTYPE *Release)(
+ IXAudio2* This);
+
+ /*** IXAudio2 methods ***/
+ HRESULT (STDMETHODCALLTYPE *RegisterForCallbacks)(
+ IXAudio2* This,
+ IXAudio2EngineCallback *pCallback);
+
+ void (STDMETHODCALLTYPE *UnregisterForCallbacks)(
+ IXAudio2* This,
+ IXAudio2EngineCallback *pCallback);
+
+ HRESULT (STDMETHODCALLTYPE *CreateSourceVoice)(
+ IXAudio2* This,
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags,
+ float MaxFrequencyRatio,
+ IXAudio2VoiceCallback *pCallback,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *CreateSubmixVoice)(
+ IXAudio2* This,
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 ProcessingStage,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+
+ HRESULT (STDMETHODCALLTYPE *CreateMasteringVoice)(
+ IXAudio2* This,
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ LPCWSTR DeviceId,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain,
+ AUDIO_STREAM_CATEGORY StreamCategory);
+
+ HRESULT (STDMETHODCALLTYPE *StartEngine)(
+ IXAudio2* This);
+
+ void (STDMETHODCALLTYPE *StopEngine)(
+ IXAudio2* This);
+
+ HRESULT (STDMETHODCALLTYPE *CommitChanges)(
+ IXAudio2* This,
+ UINT32 OperationSet);
+
+ void (STDMETHODCALLTYPE *GetPerformanceData)(
+ IXAudio2* This,
+ XAUDIO2_PERFORMANCE_DATA *pPerfData);
+
+ void (STDMETHODCALLTYPE *SetDebugConfiguration)(
+ IXAudio2* This,
+ const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,
+ void *pReserved);
+
+ END_INTERFACE
+} IXAudio2Vtbl;
+interface IXAudio2 {
+ CONST_VTBL IXAudio2Vtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define IXAudio2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IXAudio2_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IXAudio2_Release(This) (This)->lpVtbl->Release(This)
+/*** IXAudio2 methods ***/
+#define IXAudio2_RegisterForCallbacks(This,pCallback) (This)->lpVtbl->RegisterForCallbacks(This,pCallback)
+#define IXAudio2_UnregisterForCallbacks(This,pCallback) (This)->lpVtbl->UnregisterForCallbacks(This,pCallback)
+#define IXAudio2_CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (This)->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
+#define IXAudio2_CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) (This)->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain)
+#define IXAudio2_CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,StreamCategory) (This)->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,StreamCategory)
+#define IXAudio2_StartEngine(This) (This)->lpVtbl->StartEngine(This)
+#define IXAudio2_StopEngine(This) (This)->lpVtbl->StopEngine(This)
+#define IXAudio2_CommitChanges(This,OperationSet) (This)->lpVtbl->CommitChanges(This,OperationSet)
+#define IXAudio2_GetPerformanceData(This,pPerfData) (This)->lpVtbl->GetPerformanceData(This,pPerfData)
+#define IXAudio2_SetDebugConfiguration(This,pDebugConfiguration,pReserved) (This)->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT IXAudio2_QueryInterface(IXAudio2* This,REFIID riid,void **ppvObject) {
+ return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG IXAudio2_AddRef(IXAudio2* This) {
+ return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG IXAudio2_Release(IXAudio2* This) {
+ return This->lpVtbl->Release(This);
+}
+/*** IXAudio2 methods ***/
+static FORCEINLINE HRESULT IXAudio2_RegisterForCallbacks(IXAudio2* This,IXAudio2EngineCallback *pCallback) {
+ return This->lpVtbl->RegisterForCallbacks(This,pCallback);
+}
+static FORCEINLINE void IXAudio2_UnregisterForCallbacks(IXAudio2* This,IXAudio2EngineCallback *pCallback) {
+ This->lpVtbl->UnregisterForCallbacks(This,pCallback);
+}
+static FORCEINLINE HRESULT IXAudio2_CreateSourceVoice(IXAudio2* This,IXAudio2SourceVoice **ppSourceVoice,const WAVEFORMATEX *pSourceFormat,UINT32 Flags,float MaxFrequencyRatio,IXAudio2VoiceCallback *pCallback,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio2_CreateSubmixVoice(IXAudio2* This,IXAudio2SubmixVoice **ppSubmixVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 ProcessingStage,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) {
+ return This->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain);
+}
+static FORCEINLINE HRESULT IXAudio2_CreateMasteringVoice(IXAudio2* This,IXAudio2MasteringVoice **ppMasteringVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,LPCWSTR DeviceId,const XAUDIO2_EFFECT_CHAIN *pEffectChain,AUDIO_STREAM_CATEGORY StreamCategory) {
+ return This->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,StreamCategory);
+}
+static FORCEINLINE HRESULT IXAudio2_StartEngine(IXAudio2* This) {
+ return This->lpVtbl->StartEngine(This);
+}
+static FORCEINLINE void IXAudio2_StopEngine(IXAudio2* This) {
+ This->lpVtbl->StopEngine(This);
+}
+static FORCEINLINE HRESULT IXAudio2_CommitChanges(IXAudio2* This,UINT32 OperationSet) {
+ return This->lpVtbl->CommitChanges(This,OperationSet);
+}
+static FORCEINLINE void IXAudio2_GetPerformanceData(IXAudio2* This,XAUDIO2_PERFORMANCE_DATA *pPerfData) {
+ This->lpVtbl->GetPerformanceData(This,pPerfData);
+}
+static FORCEINLINE void IXAudio2_SetDebugConfiguration(IXAudio2* This,const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,void *pReserved) {
+ This->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IXAudio2_RegisterForCallbacks_Proxy(
+ IXAudio2* This,
+ IXAudio2EngineCallback *pCallback);
+void __RPC_STUB IXAudio2_RegisterForCallbacks_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2_UnregisterForCallbacks_Proxy(
+ IXAudio2* This,
+ IXAudio2EngineCallback *pCallback);
+void __RPC_STUB IXAudio2_UnregisterForCallbacks_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2_CreateSourceVoice_Proxy(
+ IXAudio2* This,
+ IXAudio2SourceVoice **ppSourceVoice,
+ const WAVEFORMATEX *pSourceFormat,
+ UINT32 Flags,
+ float MaxFrequencyRatio,
+ IXAudio2VoiceCallback *pCallback,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio2_CreateSourceVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2_CreateSubmixVoice_Proxy(
+ IXAudio2* This,
+ IXAudio2SubmixVoice **ppSubmixVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ UINT32 ProcessingStage,
+ const XAUDIO2_VOICE_SENDS *pSendList,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain);
+void __RPC_STUB IXAudio2_CreateSubmixVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2_CreateMasteringVoice_Proxy(
+ IXAudio2* This,
+ IXAudio2MasteringVoice **ppMasteringVoice,
+ UINT32 InputChannels,
+ UINT32 InputSampleRate,
+ UINT32 Flags,
+ LPCWSTR DeviceId,
+ const XAUDIO2_EFFECT_CHAIN *pEffectChain,
+ AUDIO_STREAM_CATEGORY StreamCategory);
+void __RPC_STUB IXAudio2_CreateMasteringVoice_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2_StartEngine_Proxy(
+ IXAudio2* This);
+void __RPC_STUB IXAudio2_StartEngine_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2_StopEngine_Proxy(
+ IXAudio2* This);
+void __RPC_STUB IXAudio2_StopEngine_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IXAudio2_CommitChanges_Proxy(
+ IXAudio2* This,
+ UINT32 OperationSet);
+void __RPC_STUB IXAudio2_CommitChanges_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IXAudio2_GetPerformanceData_Proxy(
+ IXAudio2* This,
+ XAUDIO2_PERFORMANCE_DATA *pPerfData);
+void __RPC_STUB IXAudio2_GetPerformanceData_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IXAudio2_INTERFACE_DEFINED__ */
+
+#define XAUDIO2_DEBUG_ENGINE (1)
+
+#define XAUDIO2_VOICE_NOPITCH (2)
+
+#define XAUDIO2_VOICE_NOSRC (4)
+
+#define XAUDIO2_VOICE_USEFILTER (8)
+
+#define XAUDIO2_VOICE_MUSIC (16)
+
+#define XAUDIO2_PLAY_TAILS (32)
+
+#define XAUDIO2_END_OF_STREAM (64)
+
+#define XAUDIO2_SEND_USEFILTER (128)
+
+#define XAUDIO2_VOICE_NOSAMPLESPLAYED (256)
+
+#define XAUDIO2_DEFAULT_FILTER_TYPE (LowPassFilter)
+
+#define XAUDIO2_DEFAULT_FILTER_FREQUENCY (XAUDIO2_MAX_FILTER_FREQUENCY)
+
+#define XAUDIO2_DEFAULT_FILTER_ONEOVERQ (1.00000000000000)
+
+#define XAUDIO2_QUANTUM_NUMERATOR (1)
+
+#define XAUDIO2_QUANTUM_DENOMINATOR (100)
+
+#define XAUDIO2_QUANTUM_MS ((1000.00000000000 * XAUDIO2_QUANTUM_NUMERATOR) / XAUDIO2_QUANTUM_DENOMINATOR)
+
+#define XAUDIO2_E_INVALID_CALL (0x88960001)
+
+#define XAUDIO2_E_XMA_DECODER_ERROR (0x88960002)
+
+#define XAUDIO2_E_XAPO_CREATION_FAILED (0x88960003)
+
+#define XAUDIO2_E_DEVICE_INVALIDATED (0x88960004)
+
+#define XAUDIO20_E_XMA_DECODER_ERROR (0x88960001)
+
+#define XAUDIO20_E_XAPO_CREATION_FAILED (0x88960002)
+
+#define XAUDIO20_E_DEVICE_INVALIDATED (0x88960003)
+
+#ifdef XAUDIO2_HELPER_FUNCTIONS
+#define _USE_MATH_DEFINES
+#include <math.h>
+inline static float XAudio2DecibelsToAmplitudeRatio(float decibels) { return powf(10.0f, decibels/20.0f); }
+inline static float XAudio2AmplitudeRatioToDecibels(float volume) { if (volume == 0) { return -3.402823466e+38f; } return 20.0f * log10f(volume); }
+inline static float XAudio2SemitonesToFrequencyRatio(float semitones) { return powf(2.0f, semitones/12.0f); }
+inline static float XAudio2FrequencyRatioToSemitones(float freqratio) { return 39.86313713864835f * log10f(freqratio); }
+inline static float XAudio2CutoffFrequencyToRadians(float cutofffreq, UINT32 samplerate) { if ((UINT32)(cutofffreq * 6.0f) >= samplerate) { return XAUDIO2_MAX_FILTER_FREQUENCY; } return 2.0f * sinf((float)M_PI * cutofffreq / samplerate); }
+inline static float XAudio2RadiansToCutoffFrequency(float radians, float samplerate) { return samplerate * asinf(radians/2.0f) / (float)M_PI; }
+#endif
+HRESULT WINAPI XAudio2Create(IXAudio2** pxaudio2, UINT32 flags, XAUDIO2_PROCESSOR processor);
+#include <poppack.h>
+/* Begin additional prototypes for all interfaces */
+
+
+/* End additional prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __widl_tab__ */
diff --git a/3rdparty/luv/.ci/install.bat b/3rdparty/luv/.ci/install.bat
deleted file mode 100644
index 1ee346dccc9..00000000000
--- a/3rdparty/luv/.ci/install.bat
+++ /dev/null
@@ -1,270 +0,0 @@
-@echo off
-
-cd %APPVEYOR_BUILD_FOLDER%
-
-:: =========================================================
-:: Set some defaults. Infer some variables.
-::
-:: These are set globally
-if "%LUA_VER%" NEQ "" (
- set LUA=lua
- set LUA_SHORTV=%LUA_VER:~0,3%
-) else (
- set LUA=luajit
- set LJ_SHORTV=%LJ_VER:~0,3%
- set LUA_SHORTV=5.1
-)
-
-:: defines LUA_DIR so Cmake can find this Lua install
-if "%LUA%"=="luajit" (
- set LUA_DIR=c:\lua\%platform%\lj%LJ_SHORTV%
-) else (
- set LUA_DIR=c:\lua\%platform%\%LUA_VER%
-)
-
-:: Now we declare a scope
-Setlocal EnableDelayedExpansion EnableExtensions
-
-if not defined LUAROCKS_URL set LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases
-if not defined LUAROCKS_REPO set LUAROCKS_REPO=https://luarocks.org
-if not defined LUA_URL set LUA_URL=http://www.lua.org/ftp
-if defined NOCOMPAT (
- set COMPATFLAG=--nocompat
-) else (
- set COMPATFLAG=
-)
-if not defined LUAJIT_GIT_REPO set LUAJIT_GIT_REPO=https://github.com/LuaJIT/LuaJIT.git
-if not defined LUAJIT_URL set LUAJIT_URL=https://github.com/LuaJIT/LuaJIT/archive
-
-if not defined LR_EXTERNAL set LR_EXTERNAL=c:\external
-if not defined LUAROCKS_INSTALL set LUAROCKS_INSTALL=%LUA_DIR%\LuaRocks
-
-
-:: LuaRocks <= 2.2.2 used a versioned directory
-:: HEAD and newer versions do not, so act accordingly.
-if defined LR_ROOT goto :skiplrver
-
-if "%LUAROCKS_VER%" EQU "HEAD" (
- set LR_ROOT=%LUAROCKS_INSTALL%
- goto :skiplrver
-)
-set LR_ROOT=%LUAROCKS_INSTALL%
-if %LUAROCKS_VER:~0,1% LEQ 2 (
- if %LUAROCKS_VER:~2,1% LEQ 2 (
- if %LUAROCKS_VER:~4,1% LEQ 3 (
- set LR_ROOT=%LUAROCKS_INSTALL%\!LUAROCKS_VER:~0,3!
- )
- )
-)
-:skiplrver
-
-if not defined LR_SYSTREE set LR_SYSTREE=%LUAROCKS_INSTALL%\systree
-
-if not defined SEVENZIP set SEVENZIP=7z
-::
-:: =========================================================
-
-:: first create some necessary directories:
-mkdir downloads 2>NUL
-
-:: Download and compile Lua (or LuaJIT)
-if "%LUA%"=="luajit" (
- if not exist %LUA_DIR% (
- if "%LJ_SHORTV%"=="2.1" (
- :: Clone repository and checkout 2.1 branch
- set lj_source_folder=%APPVEYOR_BUILD_FOLDER%\downloads\luajit-%LJ_VER%
- if not exist !lj_source_folder! (
- echo Cloning git repo %LUAJIT_GIT_REPO% !lj_source_folder!
- git clone %LUAJIT_GIT_REPO% !lj_source_folder! || call :die "Failed to clone repository"
- ) else (
- cd !lj_source_folder!
- git pull || call :die "Failed to update repository"
- )
- cd !lj_source_folder!\src
- git checkout v2.1 || call :die
- ) else (
- set lj_source_folder=%APPVEYOR_BUILD_FOLDER%\downloads\luajit-%LJ_VER%
- if not exist !lj_source_folder! (
- echo Downloading... %LUAJIT_URL%/v%LJ_VER%.tar.gz
- curl --location --silent --fail --max-time 120 --connect-timeout 30 %LUAJIT_URL%/v%LJ_VER%.tar.gz | %SEVENZIP% x -si -so -tgzip | %SEVENZIP% x -si -ttar -aoa -odownloads
- )
- cd !lj_source_folder!\src
- )
- :: Compiles LuaJIT
- if "%Configuration%"=="MinGW" (
- call mingw32-make
- ) else (
- call msvcbuild.bat
- )
-
- mkdir %LUA_DIR% 2> NUL
- for %%a in (bin bin\lua bin\lua\jit include lib) do ( mkdir "%LUA_DIR%\%%a" )
-
- for %%a in (luajit.exe lua51.dll) do ( move "!lj_source_folder!\src\%%a" "%LUA_DIR%\bin" )
- copy "%LUA_DIR%\bin\luajit.exe" "%LUA_DIR%\bin\lua.exe"
-
- move "!lj_source_folder!\src\lua51.lib" "%LUA_DIR%\lib"
- for %%a in (lauxlib.h lua.h lua.hpp luaconf.h lualib.h luajit.h) do (
- copy "!lj_source_folder!\src\%%a" "%LUA_DIR%\include"
- )
-
- copy "!lj_source_folder!\src\jit\*.lua" "%LUA_DIR%\bin\lua\jit"
-
- ) else (
- echo LuaJIT %LJ_VER% already installed at %LUA_DIR%
- )
-) else (
- if not exist %LUA_DIR% (
- :: Download and compile Lua
- if not exist downloads\lua-%LUA_VER% (
- curl --silent --fail --max-time 120 --connect-timeout 30 %LUA_URL%/lua-%LUA_VER%.tar.gz | %SEVENZIP% x -si -so -tgzip | %SEVENZIP% x -si -ttar -aoa -odownloads
- )
-
- mkdir downloads\lua-%LUA_VER%\etc 2> NUL
- copy %~dp0\winmake.bat downloads\lua-%LUA_VER%\etc\winmake.bat
-
- cd downloads\lua-%LUA_VER%
- call etc\winmake %COMPATFLAG%
- call etc\winmake install %LUA_DIR%
- ) else (
- echo Lua %LUA_VER% already installed at %LUA_DIR%
- )
-)
-
-if not exist %LUA_DIR%\bin\%LUA%.exe call :die "Missing Lua interpreter at %LUA_DIR%\bin\%LUA%.exe"
-
-set PATH=%LUA_DIR%\bin;%PATH%
-call !LUA! -v
-
-
-
-:: ==========================================================
-:: LuaRocks
-:: ==========================================================
-
-if not exist "%LR_ROOT%" (
- :: Downloads and installs LuaRocks
- cd %APPVEYOR_BUILD_FOLDER%
-
- if %LUAROCKS_VER%==HEAD (
- set lr_source_folder=%APPVEYOR_BUILD_FOLDER%\downloads\luarocks-%LUAROCKS_VER%-win32
- if not exist !lr_source_folder! (
- git clone https://github.com/keplerproject/luarocks.git --single-branch --depth 1 !lr_source_folder! || call :die "Failed to clone LuaRocks repository"
- ) else (
- cd !lr_source_folder!
- git pull || call :die "Failed to update LuaRocks repository"
- )
- ) else (
- if not exist downloads\luarocks-%LUAROCKS_VER%-win32.zip (
- echo Downloading LuaRocks...
- curl --silent --fail --max-time 120 --connect-timeout 30 --output downloads\luarocks-%LUAROCKS_VER%-win32.zip %LUAROCKS_URL%/luarocks-%LUAROCKS_VER%-win32.zip
- %SEVENZIP% x -aoa -odownloads downloads\luarocks-%LUAROCKS_VER%-win32.zip
- )
- )
-
- cd downloads\luarocks-%LUAROCKS_VER%-win32
- if "%Configuration%"=="MinGW" (
- call install.bat /LUA %LUA_DIR% /Q /LV %LUA_SHORTV% /P "%LUAROCKS_INSTALL%" /TREE "%LR_SYSTREE%" /MW
- ) else (
- call install.bat /LUA %LUA_DIR% /Q /LV %LUA_SHORTV% /P "%LUAROCKS_INSTALL%" /TREE "%LR_SYSTREE%"
- )
-
- :: Configures LuaRocks to instruct CMake the correct generator to use. Else, CMake will pick the highest
- :: Visual Studio version installed
- if "%Configuration%"=="MinGW" (
- echo cmake_generator = "MinGW Makefiles" >> %LUAROCKS_INSTALL%\config-%LUA_SHORTV%.lua
- ) else (
- set MSVS_GENERATORS[2008]=Visual Studio 9 2008
- set MSVS_GENERATORS[2010]=Visual Studio 10 2010
- set MSVS_GENERATORS[2012]=Visual Studio 11 2012
- set MSVS_GENERATORS[2013]=Visual Studio 12 2013
- set MSVS_GENERATORS[2015]=Visual Studio 14 2015
-
- set CMAKE_GENERATOR=!MSVS_GENERATORS[%Configuration%]!
- if "%platform%" EQU "x64" (set CMAKE_GENERATOR=!CMAKE_GENERATOR! Win64)
-
- echo cmake_generator = "!CMAKE_GENERATOR!" >> %LUAROCKS_INSTALL%\config-%LUA_SHORTV%.lua
- )
-)
-
-if not exist "%LR_ROOT%" call :die "LuaRocks not found at %LR_ROOT%"
-
-set PATH=%LR_ROOT%;%LR_SYSTREE%\bin;%PATH%
-
-:: Lua will use just the system rocks
-set LUA_PATH=%LR_ROOT%\lua\?.lua;%LR_ROOT%\lua\?\init.lua
-set LUA_PATH=%LUA_PATH%;%LR_SYSTREE%\share\lua\%LUA_SHORTV%\?.lua
-set LUA_PATH=%LUA_PATH%;%LR_SYSTREE%\share\lua\%LUA_SHORTV%\?\init.lua
-set LUA_PATH=%LUA_PATH%;.\?.lua;.\?\init.lua
-set LUA_CPATH=%LR_SYSTREE%\lib\lua\%LUA_SHORTV%\?.dll;.\?.dll
-
-call luarocks --version || call :die "Error with LuaRocks installation"
-call luarocks list
-
-
-if not exist "%LR_EXTERNAL%" (
- mkdir "%LR_EXTERNAL%"
- mkdir "%LR_EXTERNAL%\lib"
- mkdir "%LR_EXTERNAL%\include"
-)
-
-set PATH=%LR_EXTERNAL%;%PATH%
-
-:: Exports the following variables:
-:: (beware of whitespace between & and ^ below)
-endlocal & set PATH=%PATH%&^
-set LR_SYSTREE=%LR_SYSTREE%&^
-set LUA_PATH=%LUA_PATH%&^
-set LUA_CPATH=%LUA_CPATH%&^
-set LR_EXTERNAL=%LR_EXTERNAL%
-
-echo.
-echo ======================================================
-if "%LUA%"=="luajit" (
- echo Installation of LuaJIT %LJ_VER% and LuaRocks %LUAROCKS_VER% done.
-) else (
- echo Installation of Lua %LUA_VER% and LuaRocks %LUAROCKS_VER% done.
- if defined NOCOMPAT echo Lua was built with compatibility flags disabled.
-)
-echo Platform - %platform%
-echo LUA - %LUA%
-echo LUA_SHORTV - %LUA_SHORTV%
-echo LJ_SHORTV - %LJ_SHORTV%
-echo LUA_PATH - %LUA_PATH%
-echo LUA_CPATH - %LUA_CPATH%
-echo.
-echo LR_EXTERNAL - %LR_EXTERNAL%
-echo ======================================================
-echo.
-
-goto :eof
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-:: This blank space is intentional. If you see errors like "The system cannot find the batch label specified 'foo'"
-:: then try adding or removing blank lines lines above.
-:: Yes, really.
-:: http://stackoverflow.com/questions/232651/why-the-system-cannot-find-the-batch-label-specified-is-thrown-even-if-label-e
-
-:: helper functions:
-
-:: for bailing out when an error occurred
-:die %1
-echo %1
-exit /B 1
-goto :eof
diff --git a/3rdparty/luv/.ci/platform.sh b/3rdparty/luv/.ci/platform.sh
deleted file mode 100644
index 7259a7d6369..00000000000
--- a/3rdparty/luv/.ci/platform.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-if [ -z "${PLATFORM:-}" ]; then
- PLATFORM=$TRAVIS_OS_NAME;
-fi
-
-if [ "$PLATFORM" == "osx" ]; then
- PLATFORM="macosx";
-fi
-
-if [ -z "$PLATFORM" ]; then
- if [ "$(uname)" == "Linux" ]; then
- PLATFORM="linux";
- else
- PLATFORM="macosx";
- fi;
-fi
diff --git a/3rdparty/luv/.ci/set_compiler_env.bat b/3rdparty/luv/.ci/set_compiler_env.bat
deleted file mode 100644
index 7e8462ec57e..00000000000
--- a/3rdparty/luv/.ci/set_compiler_env.bat
+++ /dev/null
@@ -1,40 +0,0 @@
-@echo off
-
-:: Now we declare a scope
-Setlocal EnableDelayedExpansion EnableExtensions
-
-if not defined Configuration set Configuration=2015
-
-if "%Configuration%"=="MinGW" ( goto :mingw )
-
-set arch=x86
-
-if "%platform%" EQU "x64" ( set arch=x86_amd64 )
-
-if "%Configuration%"=="2015" (
- set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
-)
-
-if "%Configuration%"=="2013" (
- set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
-)
-
-if "%Configuration%"=="2012" (
- set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
-)
-
-if "%Configuration%"=="2010" (
- set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
-)
-
-if "%Configuration%"=="2008" (
- set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
-)
-
-:: Visual Studio detected
-endlocal & call %SET_VS_ENV% %arch%
-goto :eof
-
-:: MinGW detected
-:mingw
-endlocal & set PATH=c:\mingw\bin;%PATH%
diff --git a/3rdparty/luv/.ci/setenv_lua.sh b/3rdparty/luv/.ci/setenv_lua.sh
deleted file mode 100644
index 55454389398..00000000000
--- a/3rdparty/luv/.ci/setenv_lua.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin
-bash .ci/setup_lua.sh
-eval `$HOME/.lua/luarocks path`
diff --git a/3rdparty/luv/.ci/setup_lua.sh b/3rdparty/luv/.ci/setup_lua.sh
deleted file mode 100644
index f8963331767..00000000000
--- a/3rdparty/luv/.ci/setup_lua.sh
+++ /dev/null
@@ -1,122 +0,0 @@
-#! /bin/bash
-
-# A script for setting up environment for travis-ci testing.
-# Sets up Lua and Luarocks.
-# LUA must be "lua5.1", "lua5.2" or "luajit".
-# luajit2.0 - master v2.0
-# luajit2.1 - master v2.1
-
-set -eufo pipefail
-
-LUAJIT_VERSION="2.0.4"
-LUAJIT_BASE="LuaJIT-$LUAJIT_VERSION"
-
-source .ci/platform.sh
-
-LUA_HOME_DIR=$TRAVIS_BUILD_DIR/install/lua
-
-LR_HOME_DIR=$TRAVIS_BUILD_DIR/install/luarocks
-
-mkdir $HOME/.lua
-
-LUAJIT="no"
-
-if [ "$PLATFORM" == "macosx" ]; then
- if [ "$LUA" == "luajit" ]; then
- LUAJIT="yes";
- fi
- if [ "$LUA" == "luajit2.0" ]; then
- LUAJIT="yes";
- fi
- if [ "$LUA" == "luajit2.1" ]; then
- LUAJIT="yes";
- fi;
-elif [ "$(expr substr $LUA 1 6)" == "luajit" ]; then
- LUAJIT="yes";
-fi
-
-mkdir -p "$LUA_HOME_DIR"
-
-if [ "$LUAJIT" == "yes" ]; then
-
- if [ "$LUA" == "luajit" ]; then
- curl --location https://github.com/LuaJIT/LuaJIT/archive/v$LUAJIT_VERSION.tar.gz | tar xz;
- else
- git clone https://github.com/LuaJIT/LuaJIT.git $LUAJIT_BASE;
- fi
-
- cd $LUAJIT_BASE
-
- if [ "$LUA" == "luajit2.1" ]; then
- git checkout v2.1;
- # force the INSTALL_TNAME to be luajit
- perl -i -pe 's/INSTALL_TNAME=.+/INSTALL_TNAME= luajit/' Makefile
- fi
-
- make && make install PREFIX="$LUA_HOME_DIR"
-
- ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/luajit
- ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/lua;
-
-else
-
- if [ "$LUA" == "lua5.1" ]; then
- curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz
- cd lua-5.1.5;
- elif [ "$LUA" == "lua5.2" ]; then
- curl http://www.lua.org/ftp/lua-5.2.4.tar.gz | tar xz
- cd lua-5.2.4;
- elif [ "$LUA" == "lua5.3" ]; then
- curl http://www.lua.org/ftp/lua-5.3.2.tar.gz | tar xz
- cd lua-5.3.2;
- fi
-
- # Build Lua without backwards compatibility for testing
- perl -i -pe 's/-DLUA_COMPAT_(ALL|5_2)//' src/Makefile
- make $PLATFORM
- make INSTALL_TOP="$LUA_HOME_DIR" install;
-
- ln -s $LUA_HOME_DIR/bin/lua $HOME/.lua/lua
- ln -s $LUA_HOME_DIR/bin/luac $HOME/.lua/luac;
-
-fi
-
-cd $TRAVIS_BUILD_DIR
-
-lua -v
-
-LUAROCKS_BASE=luarocks-$LUAROCKS
-
-curl --location http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz
-
-cd $LUAROCKS_BASE
-
-if [ "$LUA" == "luajit" ]; then
- ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR";
-elif [ "$LUA" == "luajit2.0" ]; then
- ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR";
-elif [ "$LUA" == "luajit2.1" ]; then
- ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.1" --prefix="$LR_HOME_DIR";
-else
- ./configure --with-lua="$LUA_HOME_DIR" --prefix="$LR_HOME_DIR"
-fi
-
-make build && make install
-
-ln -s $LR_HOME_DIR/bin/luarocks $HOME/.lua/luarocks
-
-cd $TRAVIS_BUILD_DIR
-
-luarocks --version
-
-rm -rf $LUAROCKS_BASE
-
-if [ "$LUAJIT" == "yes" ]; then
- rm -rf $LUAJIT_BASE;
-elif [ "$LUA" == "lua5.1" ]; then
- rm -rf lua-5.1.5;
-elif [ "$LUA" == "lua5.2" ]; then
- rm -rf lua-5.2.4;
-elif [ "$LUA" == "lua5.3" ]; then
- rm -rf lua-5.3.2;
-fi
diff --git a/3rdparty/luv/.ci/winmake.bat b/3rdparty/luv/.ci/winmake.bat
deleted file mode 100644
index dcad55d36f7..00000000000
--- a/3rdparty/luv/.ci/winmake.bat
+++ /dev/null
@@ -1,457 +0,0 @@
-@ECHO OFF
-SETLOCAL ENABLEDELAYEDEXPANSION
-
-REM *****************************
-REM * Customization section *
-REM *****************************
-
-REM use the /help option for generic usage information
-
-REM Where is the source code located (the unpacked Lua source archive, toplevel dir)
-SET SOURCETREE=.\
-
-REM set the toolchain to either MS or GCC (allcaps), leave blank to autodetect
-SET TOOLCHAIN=
-
-REM set the compatibility flags, defaults to empty for 5.1, -DLUA_COMPAT_ALL for 5.2,
-REM and -DLUA_COMPAT_5_2 for 5.3, which are the same as the unix make files
-REM This setting can be overridden with the --nocompat flag
-SET COMPATFLAG=
-
-
-
-
-
-
-
-
-
-REM **********************************
-REM * Nothing to customize below *
-REM **********************************
-
-SET BATCHNAME=%~n0
-SET SOURCE=%SOURCETREE%src\
-SET LUA_H=%SOURCE%lua.h
-SET CURDIR=%CD%
-
-REM the following line ends with a TAB. DO NOT REMOVE IT!
-SET TABCHAR=
-REM Define LF to contain a linefeed character
-set ^"LFCHAR=^
-
-^" The above empty line is critical. DO NOT REMOVE
-
-
-REM Supported toolchains (allcaps)
-SET TOOLCHAINS=MS GCC
-REM Commands which, if exiting without error, indicate presence of the toolchain
-SET CHECK_GCC=gcc --version
-SET CHECK_MS=cl
-
-REM **********************************
-REM * Check for help request *
-REM **********************************
-
-SET HELPCMDS=help -help --help /help ? -? /?
-for %%L in ("!LFCHAR!") do for /f %%a in ("!HELPCMDS: =%%~L!") do (
- if "%%a"=="%~1" (
- echo.
- echo Builds a standalone Lua installation. Supports Lua version 5.1, 5.2 and 5.3.
- echo Your compiler must be in the system path, and this "%BATCHNAME%.bat" file must be located
- echo in ".\etc\" in the unpacked Lua source archive.
- echo.
- echo USAGE etc\%BATCHNAME% [FLAG] [COMMAND] [...]
- echo ^(execute from the root of the unpacked archive^)
- echo.
- echo Commands;
- echo clean : cleans the source tree of build ^(intermediate^) files
- echo install [path] : installs the build results into "path"
- echo local : installs into ".\local\" in the unpacked Lua source structure
- echo [toolchain] : uses a specific toolchain to build. If not provided then supported
- echo toolchains will be tested and the first available will be picked.
- echo Supported toolchains are: "%TOOLCHAINS%" ^(must use ALLCAPS^)
- echo.
- echo Flags;
- echo --nocompat : Specifies that no compatibility flags should be set when building.
- echo If not specified, the default compatibility flags will be used.
- echo.
- echo Example use;
- echo set PATH=C:\path\to\your\compiler\;%%PATH%%
- echo etc\%BATCHNAME% clean
- echo etc\%BATCHNAME%
- echo etc\%BATCHNAME% --nocompat GCC
- echo etc\%BATCHNAME% install "C:\Program Files\Lua"
- echo.
- goto :EXITOK
- )
-)
-
-REM **********************************
-REM * Check commandline *
-REM **********************************
-
-SET CMDOK=FALSE
-if "%~1"=="" (
- SET CMDOK=TRUE
-)
-for %%a in (local install clean) do (
- if "%%a"=="%~1" (
- SET CMDOK=TRUE
- )
-)
-for %%a in (--nocompat) do (
- if "%%a"=="%~1" (
- SET NOCOMPAT=TRUE
- if "%~2"=="" (
- SET CMDOK=TRUE
- )
- SHIFT
- )
-)
-for %%a in (%TOOLCHAINS%) do (
- if "%%a"=="%~1" (
- SET CMDOK=TRUE
- SET TOOLCHAIN=%~1
- )
-)
-if NOT %CMDOK%==TRUE (
- echo.
- echo Unknown command or toolchain specified.
- goto :EXITERROR
-)
-
-REM **************************************
-REM * Check for cleaning *
-REM **************************************
-
-if "%1"=="clean" (
- if NOT [%2]==[] (
- echo.
- echo ERROR: The clean command does not take extra parameters.
- ) else (
- echo Cleaning...
- if exist "%SOURCE%*.exe" del "%SOURCE%*.exe"
- if exist "%SOURCE%*.dll" del "%SOURCE%*.dll"
- if exist "%SOURCE%*.o" del "%SOURCE%*.o"
- if exist "%SOURCE%*.a" del "%SOURCE%*.a"
- if exist "%SOURCE%*.obj" del "%SOURCE%*.obj"
- if exist "%SOURCE%*.manifest" del "%SOURCE%*.manifest"
- if exist "%SOURCE%*.lib" del "%SOURCE%*.lib"
- echo Done.
- )
- goto :EXITOK
-)
-
-REM **************************************************
-REM * Fetch the Lua version from the source code *
-REM **************************************************
-
-Echo.
-Echo Checking source code to extract Lua version...
-IF NOT EXIST %LUA_H% (
- Echo Cannot locate Lua header file; %LUA_H%
- goto :EXITERROR
-)
-
-findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION_MAJOR" %LUA_H% > NUL
-if NOT %ERRORLEVEL%==0 (
- rem ECHO We've got a Lua version 5.1
- rem findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION[ %TABCHAR%]" %LUA_H%
- SET LUA_VER=5.1
-) else (
- rem ECHO We've got a Lua version 5.2+
- rem findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION_MAJOR[ %TABCHAR%]" %LUA_H%
- rem findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION_MINOR[ %TABCHAR%]" %LUA_H%
-
- for /F "delims=" %%a in ('findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION_MAJOR[ %TABCHAR%]" %LUA_H%') do set LUA_MAJOR=%%a
- SET LUA_MAJOR=!LUA_MAJOR:#define=!
- SET LUA_MAJOR=!LUA_MAJOR:LUA_VERSION_MAJOR=!
- SET LUA_MAJOR=!LUA_MAJOR: =!
- SET LUA_MAJOR=!LUA_MAJOR:%TABCHAR%=!
- SET LUA_MAJOR=!LUA_MAJOR:"=!
- SET LUA_MAJOR=!LUA_MAJOR:~0,1!
-
- for /F "delims=" %%a in ('findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION_MINOR[ %TABCHAR%]" %LUA_H%') do set LUA_MINOR=%%a
- SET LUA_MINOR=!LUA_MINOR:#define=!
- SET LUA_MINOR=!LUA_MINOR:LUA_VERSION_MINOR=!
- SET LUA_MINOR=!LUA_MINOR: =!
- SET LUA_MINOR=!LUA_MINOR:%TABCHAR%=!
- SET LUA_MINOR=!LUA_MINOR:"=!
- SET LUA_MINOR=!LUA_MINOR:~0,1!
-
- SET LUA_VER=!LUA_MAJOR!.!LUA_MINOR!
-)
-SET LUA_SVER=!LUA_VER:.=!
-
-Echo Lua version found: %LUA_VER%
-Echo.
-
-REM **************************************
-REM * Set some Lua version specifics *
-REM **************************************
-
-REM FILES_CORE; files for Lua core (+lauxlib, needed for Luac)
-REM FILES_LIB; files for Lua standard libraries
-REM FILES_DLL; vm files to be build with dll option
-REM FILES_OTH; vm files to be build without dll, for static linking
-
-if %LUA_SVER%==51 (
- set FILES_CORE=lapi lcode ldebug ldo ldump lfunc lgc llex lmem lobject lopcodes lparser lstate lstring ltable ltm lundump lvm lzio lauxlib
- set FILES_LIB=lbaselib ldblib liolib lmathlib loslib ltablib lstrlib loadlib linit
- set FILES_DLL=lua
- set FILES_OTH=luac print
- set INSTALL_H=lauxlib.h lua.h luaconf.h lualib.h ..\etc\lua.hpp
-)
-if %LUA_SVER%==52 (
- set FILES_CORE=lapi lcode lctype ldebug ldo ldump lfunc lgc llex lmem lobject lopcodes lparser lstate lstring ltable ltm lundump lvm lzio lauxlib
- set FILES_LIB=lbaselib lbitlib lcorolib ldblib liolib lmathlib loslib lstrlib ltablib loadlib linit
- set FILES_DLL=lua
- set FILES_OTH=luac
- set INSTALL_H=lauxlib.h lua.h lua.hpp luaconf.h lualib.h
- if "%COMPATFLAG%"=="" (
- set COMPATFLAG=-DLUA_COMPAT_ALL
- )
-)
-if %LUA_SVER%==53 (
- set FILES_CORE=lapi lcode lctype ldebug ldo ldump lfunc lgc llex lmem lobject lopcodes lparser lstate lstring ltable ltm lundump lvm lzio lauxlib
- set FILES_LIB=lbaselib lbitlib lcorolib ldblib liolib lmathlib loslib lstrlib ltablib lutf8lib loadlib linit
- set FILES_DLL=lua
- set FILES_OTH=luac
- set INSTALL_H=lauxlib.h lua.h lua.hpp luaconf.h lualib.h
- if "%COMPATFLAG%"=="" (
- set COMPATFLAG=-DLUA_COMPAT_5_2
- )
-)
-
-if "%NOCOMPAT%"=="TRUE" (
- set COMPATFLAG=
-)
-
-SET FILES_BASE=%FILES_DLL% %FILES_CORE% %FILES_LIB%
-
-if "%FILES_BASE%"=="" (
- Echo Unknown Lua version; %LUA_VER%
- goto :EXITERROR
-)
-
-REM *********************************
-REM * Check available toolchain *
-REM *********************************
-
-if [%TOOLCHAIN%]==[] (
- Echo Testing for MS...
- %CHECK_MS%
- IF !ERRORLEVEL!==0 SET TOOLCHAIN=MS
-)
-if [%TOOLCHAIN%]==[] (
- Echo Testing for GCC...
- %CHECK_GCC%
- IF !ERRORLEVEL!==0 SET TOOLCHAIN=GCC
-)
-if [%TOOLCHAIN%]==[] (
- Echo No supported toolchain found ^(please make sure it is in the system path^)
- goto :EXITERROR
-)
-
-REM ***************************
-REM * Configure toolchain *
-REM ***************************
-
-if %TOOLCHAIN%==GCC (
- echo Using GCC toolchain...
- SET OBJEXT=o
- SET LIBFILE=liblua%LUA_SVER%.a
-)
-if %TOOLCHAIN%==MS (
- echo Using Microsoft toolchain...
- SET OBJEXT=obj
- SET LIBFILE=lua%LUA_SVER%.lib
-)
-echo.
-
-REM **************************************
-REM * Check for installing *
-REM **************************************
-
-if "%1"=="install" (
- if "%~2"=="" (
- echo.
- echo ERROR: The install command requires a path where to install to.
- goto :EXITERROR
- )
- SET TARGETPATH=%~2
-)
-if "%1"=="local" (
- if NOT "%~2"=="" (
- echo.
- echo ERROR: The local command does not take extra parameters.
- goto :EXITERROR
- )
- SET TARGETPATH=%SOURCETREE%local
-)
-if NOT "%TARGETPATH%"=="" (
- mkdir "%TARGETPATH%\bin"
- mkdir "%TARGETPATH%\include"
- mkdir "%TARGETPATH%\lib\lua\%LUA_VER%"
- mkdir "%TARGETPATH%\man\man1"
- mkdir "%TARGETPATH%\share\lua\%LUA_VER%"
- copy "%SOURCE%lua.exe" "%TARGETPATH%\bin"
- copy "%SOURCE%luac.exe" "%TARGETPATH%\bin"
- copy "%SOURCE%lua%LUA_SVER%.dll" "%TARGETPATH%\bin"
- for %%a in (%INSTALL_H%) do ( copy "%SOURCE%%%a" "%TARGETPATH%\include" )
- copy "%SOURCE%%LIBFILE%" "%TARGETPATH%\lib"
- copy "%SOURCETREE%doc\lua.1" "%TARGETPATH%\man\man1"
- copy "%SOURCETREE%doc\luac.1" "%TARGETPATH%\man\man1"
-
- echo Installation completed in "%TARGETPATH%".
- goto :EXITOK
-)
-
-REM ***********************
-REM * Compile sources *
-REM ***********************
-goto :after_compile_function
-:compile_function
- REM Params: %1 is filelist (must be quoted)
- REM Return: same list, with the object file extension included, will be stored in global OBJLIST
-
- for %%a in (%~1) do (
- SET FILENAME=%%a
- if %TOOLCHAIN%==GCC (
- SET COMPCMD=gcc -O2 -Wall !EXTRAFLAG! !COMPATFLAG! -c -o !FILENAME!.%OBJEXT% !FILENAME!.c
- )
- if %TOOLCHAIN%==MS (
- SET COMPCMD=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE !COMPATFLAG! !EXTRAFLAG! !FILENAME!.c
- )
- echo !COMPCMD!
- !COMPCMD!
- SET OBJLIST=!OBJLIST! !FILENAME!.%OBJEXT%
- )
-
-goto :eof
-:after_compile_function
-
-CD %SOURCE%
-REM Traverse the 4 lists of source files
-
-for %%b in (CORE LIB DLL OTH) do (
- SET LTYPE=%%b
- SET OBJLIST=
- if !LTYPE!==OTH (
- REM OTH is the only list of files build without DLL option
- SET EXTRAFLAG=
- ) else (
- SET EXTRAFLAG=-DLUA_BUILD_AS_DLL
- )
- if !LTYPE!==CORE SET FILELIST=%FILES_CORE%
- if !LTYPE!==LIB SET FILELIST=%FILES_LIB%
- if !LTYPE!==DLL SET FILELIST=%FILES_DLL%
- if !LTYPE!==OTH SET FILELIST=%FILES_OTH%
-
- echo Now compiling !LTYPE! file set...
- call:compile_function "!FILELIST!"
-
- if !LTYPE!==CORE SET FILES_CORE_O=!OBJLIST!
- if !LTYPE!==LIB SET FILES_LIB_O=!OBJLIST!
- if !LTYPE!==DLL SET FILES_DLL_O=!OBJLIST!
- if !LTYPE!==OTH SET FILES_OTH_O=!OBJLIST!
-)
-
-
-REM ****************************
-REM * Link GCC based files *
-REM ****************************
-
-if %TOOLCHAIN%==GCC (
- REM Link the LuaXX.dll file
- SET LINKCMD=gcc -shared -o lua%LUA_SVER%.dll %FILES_CORE_O% %FILES_LIB_O%
- echo !LINKCMD!
- !LINKCMD!
-
- REM strip from LuaXX.dll
- SET RANCMD=strip --strip-unneeded lua%LUA_SVER%.dll
- echo !RANCMD!
- !RANCMD!
-
- REM Link the Lua.exe file
- SET LINKCMD=gcc -o lua.exe -s lua.%OBJEXT% lua%LUA_SVER%.dll -lm
- echo !LINKCMD!
- !LINKCMD!
-
- REM create lib archive
- SET LIBCMD=ar rcu liblua%LUA_SVER%.a %FILES_CORE_O% %FILES_LIB_O%
- echo !LIBCMD!
- !LIBCMD!
-
- REM Speedup index using ranlib
- SET RANCMD=ranlib liblua%LUA_SVER%.a
- echo !RANCMD!
- !RANCMD!
-
- REM Link Luac.exe file
- SET LINKCMD=gcc -o luac.exe %FILES_OTH_O% liblua%LUA_SVER%.a -lm
- echo !LINKCMD!
- !LINKCMD!
-
-)
-
-
-REM ****************************
-REM * Link MS based files *
-REM ****************************
-
-if %TOOLCHAIN%==MS (
- REM Link the LuaXX.dll file, and LuaXX.obj
- SET LINKCMD=link /nologo /DLL /out:lua%LUA_SVER%.dll %FILES_CORE_O% %FILES_LIB_O%
- echo !LINKCMD!
- !LINKCMD!
-
- REM handle dll manifest
- if exist lua%LUA_SVER%.dll.manifest (
- SET MANICMD=mt /nologo -manifest lua%LUA_SVER%.dll.manifest -outputresource:lua%LUA_SVER%.dll;2
- echo !MANICMD!
- !MANICMD!
- )
-
- REM Link Lua.exe
- SET LINKCMD=link /nologo /out:lua.exe lua.%OBJEXT% lua%LUA_SVER%.lib
- echo !LINKCMD!
- !LINKCMD!
-
- REM handle manifest
- if exist lua.exe.manifest (
- SET MANICMD=mt /nologo -manifest lua.exe.manifest -outputresource:lua.exe
- echo !MANICMD!
- !MANICMD!
- )
-
- REM Link Luac.exe
- SET LINKCMD=link /nologo /out:luac.exe %FILES_OTH_O% %FILES_CORE_O%
- echo !LINKCMD!
- !LINKCMD!
-
- REM handle manifest
- if exist luac.exe.manifest (
- SET MANICMD=mt /nologo -manifest luac.exe.manifest -outputresource:luac.exe
- echo !MANICMD!
- !MANICMD!
- )
-)
-
-CD %CURDIR%
-
-REM ****************************
-REM * Finished building *
-REM ****************************
-
-echo.
-echo Build completed.
-goto :EXITOK
-
-:EXITOK
-exit /B 0
-
-:EXITERROR
-echo For help try; etc\%BATCHNAME% /help
-exit /B 1
diff --git a/3rdparty/luv/.gitignore b/3rdparty/luv/.gitignore
deleted file mode 100644
index 8bcf497a42c..00000000000
--- a/3rdparty/luv/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-build
-libluv.a
-libluv.so
-luv.so
-luv.dll
-luajit.exe
-luv-*.tar.gz
-luv-*.src.rock
-luv-*/
-build.luarocks/
diff --git a/3rdparty/luv/.travis.yml b/3rdparty/luv/.travis.yml
deleted file mode 100644
index b6909b894cc..00000000000
--- a/3rdparty/luv/.travis.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-language: c
-sudo: false
-
-addons:
- apt:
- sources:
- - kalakris-cmake
- packages:
- - cmake
-
-env:
- global:
- - LUAROCKS=2.3.0
- matrix:
- - WITH_LUA_ENGINE=Lua LUA=lua5.3
- - WITH_LUA_ENGINE=LuaJIT LUA=luajit2.1
- - PROCESS_CLEANUP_TEST=1 LUA=lua5.2
-
-os:
- - linux
- - osx
-
-before_install:
- - git submodule update --init --recursive
- - git submodule update --recursive
-
-script:
- - if [ "x$PROCESS_CLEANUP_TEST" = "x" ]; then make && make test; else ./tests/test-sigchld-after-lua_close.sh; fi
- # Test rock installation
- - source .ci/setenv_lua.sh
- - luarocks make
- - test $PWD = `lua -e "print(require'luv'.cwd())"`
-
-notifications:
- email: true
- irc: "irc.freenode.org#luvit"
diff --git a/3rdparty/luv/CMakeLists.txt b/3rdparty/luv/CMakeLists.txt
deleted file mode 100644
index 9f079670de2..00000000000
--- a/3rdparty/luv/CMakeLists.txt
+++ /dev/null
@@ -1,191 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-
-if(POLICY CMP0053)
- cmake_policy(SET CMP0053 NEW) # faster evaluation of variable references
-endif()
-
-project (luv C ASM)
-
-set(LUV_VERSION_MAJOR 1)
-set(LUV_VERSION_MINOR 8)
-set(LUV_VERSION_PATCH 0)
-set(LUV_VERSION ${LUV_VERSION_MAJOR}.${LUV_VERSION_MINOR}.${LUV_VERSION_PATCH})
-
-option(BUILD_MODULE "Build as module" ON)
-option(BUILD_SHARED_LIBS "Build shared library" OFF)
-option(WITH_SHARED_LIBUV "Link to a shared libuv library instead of static linking" OFF)
-
-if (NOT WITH_LUA_ENGINE)
- set(WITH_LUA_ENGINE "LuaJIT"
- CACHE STRING "Link to LuaJIT or PUC Lua" FORCE)
- set_property(CACHE WITH_LUA_ENGINE
- PROPERTY STRINGS "Lua;LuaJIT")
-endif (NOT WITH_LUA_ENGINE)
-
-if (NOT LUA_BUILD_TYPE)
- set(LUA_BUILD_TYPE "Static"
- CACHE STRING "Build Lua/LuaJIT as static, dynamic libary, or use system one" FORCE)
- set_property(CACHE LUA_BUILD_TYPE
- PROPERTY STRINGS "Static;Dynamic;System")
-endif (NOT LUA_BUILD_TYPE)
-
-if (WITH_LUA_ENGINE STREQUAL Lua)
- add_definitions(-DLUA_USE_DLOPEN)
- set(USE_LUAJIT OFF)
-else ()
- set(USE_LUAJIT ON)
-endif ()
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
-
-if (WITH_SHARED_LIBUV)
- find_package(Libuv)
- if (LIBUV_FOUND)
- include_directories(${LIBUV_INCLUDE_DIR})
- endif (LIBUV_FOUND)
-else (WITH_SHARED_LIBUV)
- include(deps/uv.cmake)
- if (BUILD_MODULE)
- add_definitions( -DBUILDING_UV_SHARED )
- endif (BUILD_MODULE)
-endif (WITH_SHARED_LIBUV)
-
-if (LUA)
- MESSAGE(STATUS "Lua: using information from luarocks")
-
- MESSAGE(STATUS "LUA_LIBDIR: " ${LUA_LIBDIR})
- MESSAGE(STATUS "LUA_INCDIR: " ${LUA_INCDIR})
- MESSAGE(STATUS "LUA: " ${LUA})
-
- SET(LUA_EXECUTABLE "${LUA}")
- SET(LUA_INCLUDE_DIR "${LUA_INCDIR}")
- SET(LUA_PACKAGE_PATH "${LUADIR}")
- SET(LUA_PACKAGE_CPATH "${LIBDIR}")
-
- SET(INSTALL_LIB_DIR ${LIBDIR})
-
- GET_FILENAME_COMPONENT(LUA_EXEC_NAME ${LUA_EXECUTABLE} NAME_WE)
- IF(LUA_EXEC_NAME STREQUAL "luajit")
- FIND_LIBRARY(LUA_LIBRARIES
- NAMES luajit libluajit
- PATHS ${LUA_LIBDIR}
- NO_DEFAULT_PATH)
- ELSEIF(LUA_EXEC_NAME STREQUAL "lua")
- FIND_LIBRARY(LUA_LIBRARIES
- NAMES lua lua53 lua52 lua51 liblua liblua53 liblua52 liblua51
- PATHS ${LUA_LIBDIR}
- NO_DEFAULT_PATH)
- ENDIF()
- MESSAGE(STATUS "Lua library: ${LUA_LIBRARIES}")
-
- include_directories(${LUA_INCLUDE_DIR})
-else (LUA)
- if (LUA_BUILD_TYPE STREQUAL System)
- if (USE_LUAJIT)
- find_package(LuaJIT)
- if (LUAJIT_FOUND)
- include_directories(${LUAJIT_INCLUDE_DIR})
- link_directories(${LUAJIT_LIBRARIES})
- endif (LUAJIT_FOUND)
- else (USE_LUAJIT)
- find_package(Lua)
- if (LUA_FOUND)
- include_directories(${LUA_INCLUDE_DIR})
- endif (LUA_FOUND)
- endif (USE_LUAJIT)
-
- else (LUA_BUILD_TYPE STREQUAL System)
- if (LUA_BUILD_TYPE STREQUAL Static)
- SET(WITH_SHARED_LUA OFF)
- else (LUA_BUILD_TYPE STREQUAL Static)
- SET(WITH_SHARED_LUA ON)
- endif (LUA_BUILD_TYPE STREQUAL Static)
- if (USE_LUAJIT)
- include(deps/luajit.cmake)
- include_directories(deps/luajit/src)
- else(USE_LUAJIT)
- include(deps/lua.cmake)
- include_directories(deps/lua/src)
- endif (USE_LUAJIT)
- endif (LUA_BUILD_TYPE STREQUAL System)
-endif (LUA)
-
-if (BUILD_MODULE)
- add_library(luv MODULE src/luv.c)
- set_target_properties(luv PROPERTIES PREFIX "")
-else (BUILD_MODULE)
- add_library(luv src/luv.c)
- if (BUILD_SHARED_LIBS)
- set_target_properties(luv
- PROPERTIES VERSION ${LUV_VERSION} SOVERSION ${LUV_VERSION_MAJOR})
- endif (BUILD_SHARED_LIBS)
-endif (BUILD_MODULE)
-
-if(APPLE)
- set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
- "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined suppress"
- )
- # execute_process(COMMAND which luajit OUTPUT_VARIABLE LUAJIT)
- # set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
- # "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -bundle_loader ${LUAJIT}"
- # )
-endif()
-
-if(WIN32)
- add_definitions(-DLUA_BUILD_AS_DLL -DLUA_LIB)
- if (LUA)
- target_link_libraries(luv uv ${LUA_LIBRARIES})
- else (LUA)
- if (USE_LUAJIT)
- target_link_libraries(luv uv luajit-5.1)
- else (USE_LUAJIT)
- if (LUA_BUILD_TYPE STREQUAL System)
- target_link_libraries(luv uv ${LUA_LIBRARIES})
- else (LUA_BUILD_TYPE STREQUAL System)
- target_link_libraries(luv uv lualib)
- endif (LUA_BUILD_TYPE STREQUAL System)
- endif (USE_LUAJIT)
- endif (LUA)
- # replace /MD to /MT to avoid link msvcr*.dll
- set(CompilerFlags
- CMAKE_C_FLAGS
- CMAKE_C_FLAGS_DEBUG
- CMAKE_C_FLAGS_MINSIZEREL
- CMAKE_C_FLAGS_RELWITHDEBINFO
- CMAKE_C_FLAGS_RELEASE)
- foreach(CompilerFlag ${CompilerFlags})
- string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
- endforeach()
-elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
- target_link_libraries(luv uv rt)
-else()
- target_link_libraries(luv uv)
-endif()
-
-if (NOT LUA)
- if (BUILD_MODULE)
- if (WIN32)
- set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
- else (WIN32)
- set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib/lua/${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}")
- endif (WIN32)
- else (BUILD_MODULE)
- set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib"
- CACHE PATH "Installation directory for libraries")
- set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include/luv"
- CACHE PATH "Installation directory for headers")
- endif (BUILD_MODULE)
-endif ()
-
-if (CMAKE_INSTALL_PREFIX)
- install(TARGETS luv
- ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
- LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
- )
- if (NOT BUILD_MODULE)
- install(
- FILES src/luv.h src/util.h src/lhandle.h src/lreq.h
- DESTINATION "${INSTALL_INC_DIR}"
- )
- endif (NOT BUILD_MODULE)
-endif (CMAKE_INSTALL_PREFIX)
diff --git a/3rdparty/luv/LICENSE.txt b/3rdparty/luv/LICENSE.txt
deleted file mode 100644
index d6456956733..00000000000
--- a/3rdparty/luv/LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/3rdparty/luv/Makefile b/3rdparty/luv/Makefile
deleted file mode 100644
index 1e7038c47ab..00000000000
--- a/3rdparty/luv/Makefile
+++ /dev/null
@@ -1,61 +0,0 @@
-LUV_TAG=$(shell git describe --tags)
-
-ifdef WITHOUT_AMALG
- CMAKE_OPTIONS+= -DWITH_AMALG=OFF
-endif
-
-BUILD_MODULE ?= ON
-BUILD_SHARED_LIBS ?= OFF
-WITH_SHARED_LIBUV ?= OFF
-WITH_LUA_ENGINE ?= LuaJIT
-LUA_BUILD_TYPE ?= Static
-
-
-ifeq ($(WITH_LUA_ENGINE), LuaJIT)
- LUABIN=build/luajit
-else
- LUABIN=build/lua
-endif
-
-CMAKE_OPTIONS += \
- -DBUILD_MODULE=$(BUILD_MODULE) \
- -DBUILD_SHARED_LIBS=$(BUILD_SHARED_LIBS) \
- -DWITH_SHARED_LIBUV=$(WITH_SHARED_LIBUV) \
- -DWITH_LUA_ENGINE=$(WITH_LUA_ENGINE) \
- -DLUA_BUILD_TYPE=$(LUA_BUILD_TYPE) \
-
-all: luv
-
-deps/libuv/include:
- git submodule update --init deps/libuv
-
-deps/luajit/src:
- git submodule update --init deps/luajit
-
-build/Makefile: deps/libuv/include deps/luajit/src
- cmake -H. -Bbuild ${CMAKE_OPTIONS} -DWITH_AMALG=OFF
-
-luv: build/Makefile
- cmake --build build --config Debug
- ln -sf build/luv.so
-
-clean:
- rm -rf build luv.so
-
-test: luv
- ${LUABIN} tests/run.lua
-
-reset:
- git submodule update --init --recursive && \
- git clean -f -d && \
- git checkout .
-
-publish-luarocks:
- rm -rf luv-${LUV_TAG}
- mkdir -p luv-${LUV_TAG}/deps
- cp -r src cmake CMakeLists.txt LICENSE.txt README.md docs.md luv-${LUV_TAG}/
- cp -r deps/libuv deps/*.cmake deps/lua_one.c luv-${LUV_TAG}/deps/
- tar -czvf luv-${LUV_TAG}.tar.gz luv-${LUV_TAG}
- github-release upload --user luvit --repo luv --tag ${LUV_TAG} \
- --file luv-${LUV_TAG}.tar.gz --name luv-${LUV_TAG}.tar.gz
- luarocks upload luv-${LUV_TAG}.rockspec --api-key=${LUAROCKS_TOKEN}
diff --git a/3rdparty/luv/README.md b/3rdparty/luv/README.md
deleted file mode 100644
index 47059d01ee7..00000000000
--- a/3rdparty/luv/README.md
+++ /dev/null
@@ -1,213 +0,0 @@
-luv
-===
-
-[![Linux Build Status](https://travis-ci.org/luvit/luv.svg?branch=master)](https://travis-ci.org/luvit/luv)
-
-[![Windows Build status](https://ci.appveyor.com/api/projects/status/uo1qhdcc0vcqsiok/branch/master?svg=true)](https://ci.appveyor.com/project/racker-buildbot/luv/branch/master)
-
-[libuv](https://github.com/joyent/libuv) bindings for
-[luajit](http://luajit.org/) and [lua](http://www.lua.org/)
-[5.1](http://www.lua.org/manual/5.1/manual.html)/
-[5.2](http://www.lua.org/manual/5.2/manual.html)/
-[5.3](http://www.lua.org/manual/5.3/manual.html).
-
-This library makes libuv available to lua scripts. It was made for the [luvit](http://luvit.io/) project but should usable from nearly any lua project.
-
-The library can be used by multiple threads at once. Each thread is assumed to load the library from a different `lua_State`. Luv will create a unique `uv_loop_t` for each state. You can't share uv handles between states/loops.
-
-The best docs currently are the [libuv docs](http://docs.libuv.org/) themselves. Hopfully soon we'll have a copy locally tailored for lua.
-
-```lua
-local uv = require('luv')
-
--- Create a handle to a uv_timer_t
-local timer = uv.new_timer()
-
--- This will wait 1000ms and then continue inside the callback
-timer:start(1000, 0, function ()
- -- timer here is the value we passed in before from new_timer.
-
- print ("Awake!")
-
- -- You must always close your uv handles or you'll leak memory
- -- We can't depend on the GC since it doesn't know enough about libuv.
- timer:close()
-end)
-
-print("Sleeping");
-
--- uv.run will block and wait for all events to run.
--- When there are no longer any active handles, it will return
-uv.run()
-```
-
-
-Here is an example of an TCP echo server
-```lua
-local uv = require('luv')
-
-local function create_server(host, port, on_connection)
-
- local server = uv.new_tcp()
- server:bind(host, port)
-
- server:listen(128, function(err)
- -- Make sure there was no problem setting up listen
- assert(not err, err)
-
- -- Accept the client
- local client = uv.new_tcp()
- server:accept(client)
-
- on_connection(client)
- end)
-
- return server
-end
-
-local server = create_server("0.0.0.0", 0, function (client)
-
- client:read_start(function (err, chunk)
-
- -- Crash on errors
- assert(not err, err)
-
- if chunk then
- -- Echo anything heard
- client:write(chunk)
- else
- -- When the stream ends, close the socket
- client:close()
- end
- end)
-end)
-
-print("TCP Echo serverr listening on port " .. server:getsockname().port)
-
-uv.run()
-```
-
-More examples can be found in the [examples](examples) and [tests](tests) folders.
-
-## Building From Source
-
-To build, first install your compiler tools.
-
-### Get a Compiler
-
-On linux this probably means `gcc` and `make`. On Ubuntu, the `build-essential`
-package is good for this.
-
-On OSX, you probably want XCode which comes with `clang` and `make` and friends.
-
-For windows the free Visual Studio Express works. If you get the 2013 edition,
-make sure to get the `Windows Deskop` edition. The `Windows` version doesn't
-include a working C compiler. Make sure to run all of setup including getting a
-free license.
-
-### Install CMake
-
-Now install Cmake. The version in `brew` on OSX or most Linux package managers
-is good. The version on Travis CI is too old and so I use a PPA there. On
-windows use the installer and make sure to add cmake to your command prompt
-path.
-
-### Install Git
-
-If you haven't already, install git and make sure it's in your path. This comes
-with XCode on OSX. On Linux it's in your package manager. For windows, use the
-installer at <http://git-scm.com>. Make sure it's available to your windows
-command prompt.
-
-### Clone the Code
-
-Now open a terminal and clone the code. For windows I recommend the special
-developer command prompt that came with Visual Studio.
-
-```
-git clone https://github.com/luvit/luv.git --recursive
-cd luv
-```
-
-### Build the Code and Test
-
-On windows I wrote a small batch file that runs the correct cmake commands and
-copies the output files for easy access.
-
-```
-C:\Code\luv> msvcbuild.bat
-C:\Code\luv> luajit tests\run.lua
-```
-
-On unix systems, use the Makefile.
-
-```
-~/Code/luv> make test
-```
-
-This will build luv as a module library. Module libraries are plugins that are
-not linked into other targets.
-
-#### Build with PUC Lua 5.3
-By default luv is linked with LuaJIT 2.0.4. If you rather like to link luv
-with PUC Lua 5.3 you can run make with:
-
-```
-~/Code/luv> WITH_LUA_ENGINE=Lua make
-```
-
-#### Build as static library
-
-If you want to build luv as a static library run make with:
-
-```
-~/Code/luv> BUILD_MODULE=OFF make
-```
-
-This will create a static library `libluv.a`.
-
-#### Build as shared library
-
-If you want to build luv as a shared library run make with:
-
-```
-~/Code/luv> BUILD_MODULE=OFF BUILD_SHARED_LIBS=ON make
-```
-
-This will create a shared library `libluv.so`.
-
-#### Build with shared libraries
-
-By default the build system will build luv with the supplied dependencies.
-These are:
- * libuv
- * LuaJIT or Lua
-
-However, if your target system has already one or more of these dependencies
-installed you can link `luv` against them.
-
-##### Linking with shared libuv
-
-The default shared library name for libuv is `libuv`. To link against it use:
-
-```
-~/Code/luv> WITH_SHARED_LIBUV=ON make
-```
-
-##### Linking with shared LuaJIT
-
-The default shared library name for LuaJIT is `libluajit-5.1`. To link against
-it use:
-
-```
-~/Code/luv> LUA_BUILD_TYPE=System make
-```
-
-##### Linking with shared Lua 5.x
-
-The default shared library name for Lua 5.x is `liblua5.x`. To link against
-it use:
-
-```
-~/Code/luv> LUA_BUILD_TYPE=System WITH_LUA_ENGINE=Lua make
-```
diff --git a/3rdparty/luv/appveyor.yml b/3rdparty/luv/appveyor.yml
deleted file mode 100644
index b8d01898573..00000000000
--- a/3rdparty/luv/appveyor.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-os: Visual Studio 2015
-
-# Test with the latest two releases of MSVC
-configuration:
- - 2015
- - 2013
-
-# Test with the latest Lua and LuaJIT versions
-environment:
- LUAROCKS_VER: 2.3.0
- matrix:
- - LUA_VER: 5.3.2
- NOCOMPAT: true # with compatibility flags disabled.
- - LJ_VER: 2.1
-
-platform:
- - x86
- - x64
-
-matrix:
- fast_finish: true
-
-cache:
- - c:\lua -> appveyor.yml
- - c:\external -> appveyor.yml
-
-install:
- - git submodule update --init
-
-build_script:
- - msvcbuild.bat
- - luajit.exe tests\run.lua
- # Test rock installation
- - call .ci\set_compiler_env.bat
- - call .ci\install.bat
- - luarocks make
- - ps: if("$(Get-Location)" -eq $(lua -e "print(require'luv'.cwd())")) { "LuaRocks test OK" } else { "LuaRocks test failed"; exit 1 }
- - luarocks remove luv
-
-artifacts:
- - path: luv.dll
- - path: luajit.exe
diff --git a/3rdparty/luv/cmake/Modules/FindLibuv.cmake b/3rdparty/luv/cmake/Modules/FindLibuv.cmake
deleted file mode 100644
index 045362ae5db..00000000000
--- a/3rdparty/luv/cmake/Modules/FindLibuv.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-# Locate libuv library
-# This module defines
-# LIBUV_FOUND, if false, do not try to link to libuv
-# LIBUV_LIBRARIES
-# LIBUV_INCLUDE_DIR, where to find uv.h
-
-FIND_PATH(LIBUV_INCLUDE_DIR NAMES uv.h)
-FIND_LIBRARY(LIBUV_LIBRARIES NAMES uv libuv)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUV DEFAULT_MSG LIBUV_LIBRARIES LIBUV_INCLUDE_DIR)
diff --git a/3rdparty/luv/cmake/Modules/FindLuaJIT.cmake b/3rdparty/luv/cmake/Modules/FindLuaJIT.cmake
deleted file mode 100644
index b9c2c3ee41a..00000000000
--- a/3rdparty/luv/cmake/Modules/FindLuaJIT.cmake
+++ /dev/null
@@ -1,55 +0,0 @@
-#=============================================================================
-# Copyright 2007-2009 Kitware, Inc.
-# Copyright 2013 Rolf Eike Beer <eike@sf-mail.de>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# We use code from the CMake project to detect the Lua version.
-
-# Locate LuaJIT library
-# This module defines
-# LUAJIT_FOUND, if false, do not try to link to Lua JIT
-# LUAJIT_LIBRARIES
-# LUAJIT_INCLUDE_DIR, where to find lua.h
-#
-# Additionally it defines the Lua API/ABI version:
-# LUA_VERSION_STRING - the version of Lua found
-# LUA_VERSION_MAJOR - the major version of Lua
-# LUA_VERSION_MINOR - the minor version of Lua
-# LUA_VERSION_PATCH - the patch version of Lua
-
-FIND_PATH(LUAJIT_INCLUDE_DIR NAMES lua.h PATH_SUFFIXES luajit-2.0)
-FIND_LIBRARY(LUAJIT_LIBRARIES NAMES luajit-5.1)
-
-if (LUAJIT_INCLUDE_DIR AND EXISTS "${LUAJIT_INCLUDE_DIR}/lua.h")
- # At least 5.[012] have different ways to express the version
- # so all of them need to be tested. Lua 5.2 defines LUA_VERSION
- # and LUA_RELEASE as joined by the C preprocessor, so avoid those.
- file(STRINGS "${LUAJIT_INCLUDE_DIR}/lua.h" lua_version_strings
- REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*")
-
- string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};")
- if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$")
- string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};")
- string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};")
- set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}")
- else ()
- string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
- if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$")
- string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
- endif ()
- string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}")
- string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}")
- string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}")
- endif ()
-
- unset(lua_version_strings)
-endif()
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LUAJIT DEFAULT_MSG LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
diff --git a/3rdparty/luv/deps/lua.cmake b/3rdparty/luv/deps/lua.cmake
deleted file mode 100644
index 393e67a107a..00000000000
--- a/3rdparty/luv/deps/lua.cmake
+++ /dev/null
@@ -1,128 +0,0 @@
-# Modfied from luajit.cmake
-# Added LUAJIT_ADD_EXECUTABLE Ryan Phillips <ryan at trolocsis.com>
-# This CMakeLists.txt has been first taken from LuaDist
-# Copyright (C) 2007-2011 LuaDist.
-# Created by Peter Drahoš
-# Redistribution and use of this file is allowed according to the terms of the MIT license.
-# Debugged and (now seriously) modified by Ronan Collobert, for Torch7
-
-#project(Lua53 C)
-
-SET(LUA_DIR ${CMAKE_CURRENT_LIST_DIR}/lua)
-
-SET(CMAKE_REQUIRED_INCLUDES
- ${LUA_DIR}
- ${LUA_DIR}/src
- ${CMAKE_CURRENT_BINARY_DIR}
-)
-
-OPTION(WITH_AMALG "Build eveything in one shot (needs memory)" ON)
-
-# Ugly warnings
-IF(MSVC)
- ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
-ENDIF()
-
-# Various includes
-INCLUDE(CheckLibraryExists)
-INCLUDE(CheckFunctionExists)
-INCLUDE(CheckCSourceCompiles)
-INCLUDE(CheckTypeSize)
-
-CHECK_TYPE_SIZE("void*" SIZEOF_VOID_P)
-IF(SIZEOF_VOID_P EQUAL 8)
- ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE)
-ENDIF()
-
-IF(NOT WIN32)
- FIND_LIBRARY(DL_LIBRARY "dl")
- IF(DL_LIBRARY)
- SET(CMAKE_REQUIRED_LIBRARIES ${DL_LIBRARY})
- LIST(APPEND LIBS ${DL_LIBRARY})
- ENDIF(DL_LIBRARY)
- CHECK_FUNCTION_EXISTS(dlopen LUA_USE_DLOPEN)
- IF(NOT LUA_USE_DLOPEN)
- MESSAGE(FATAL_ERROR "Cannot compile a useful lua.
-Function dlopen() seems not to be supported on your platform.
-Apparently you are not on a Windows platform as well.
-So lua has no way to deal with shared libraries!")
- ENDIF(NOT LUA_USE_DLOPEN)
-ENDIF(NOT WIN32)
-
-check_library_exists(m sin "" LUA_USE_LIBM)
-if ( LUA_USE_LIBM )
- list ( APPEND LIBS m )
-endif ()
-
-## SOURCES
-SET(SRC_LUALIB
- ${LUA_DIR}/src/lbaselib.c
- ${LUA_DIR}/src/lcorolib.c
- ${LUA_DIR}/src/ldblib.c
- ${LUA_DIR}/src/liolib.c
- ${LUA_DIR}/src/lmathlib.c
- ${LUA_DIR}/src/loadlib.c
- ${LUA_DIR}/src/loslib.c
- ${LUA_DIR}/src/lstrlib.c
- ${LUA_DIR}/src/ltablib.c
- ${LUA_DIR}/src/lutf8lib.c)
-
-SET(SRC_LUACORE
- ${LUA_DIR}/src/lauxlib.c
- ${LUA_DIR}/src/lapi.c
- ${LUA_DIR}/src/lcode.c
- ${LUA_DIR}/src/lctype.c
- ${LUA_DIR}/src/ldebug.c
- ${LUA_DIR}/src/ldo.c
- ${LUA_DIR}/src/ldump.c
- ${LUA_DIR}/src/lfunc.c
- ${LUA_DIR}/src/lgc.c
- ${LUA_DIR}/src/linit.c
- ${LUA_DIR}/src/llex.c
- ${LUA_DIR}/src/lmem.c
- ${LUA_DIR}/src/lobject.c
- ${LUA_DIR}/src/lopcodes.c
- ${LUA_DIR}/src/lparser.c
- ${LUA_DIR}/src/lstate.c
- ${LUA_DIR}/src/lstring.c
- ${LUA_DIR}/src/ltable.c
- ${LUA_DIR}/src/ltm.c
- ${LUA_DIR}/src/lundump.c
- ${LUA_DIR}/src/lvm.c
- ${LUA_DIR}/src/lzio.c
- ${SRC_LUALIB})
-
-## GENERATE
-
-IF(WITH_SHARED_LUA)
- IF(WITH_AMALG)
- add_library(lualib SHARED ${LUA_DIR}/../lua_one.c ${DEPS})
- ELSE()
- add_library(lualib SHARED ${SRC_LUACORE} ${DEPS} )
- ENDIF()
-ELSE()
- IF(WITH_AMALG)
- add_library(lualib STATIC ${LUA_DIR}/../lua_one.c ${DEPS} )
- ELSE()
- add_library(lualib STATIC ${SRC_LUACORE} ${DEPS} )
- ENDIF()
- set_target_properties(lualib PROPERTIES
- PREFIX "lib" IMPORT_PREFIX "lib")
-ENDIF()
-
-target_link_libraries (lualib ${LIBS} )
-set_target_properties (lualib PROPERTIES OUTPUT_NAME "lua53")
-
-IF(WIN32)
- add_executable(lua ${LUA_DIR}/src/lua.c)
- target_link_libraries(lua lualib)
-ELSE()
- IF(WITH_AMALG)
- add_executable(lua ${LUA_DIR}/src/lua.c ${LUA_DIR}/lua_one.c ${DEPS})
- ELSE()
- add_executable(lua ${LUA_DIR}/src/lua.c ${SRC_LUACORE} ${DEPS})
- ENDIF()
- target_link_libraries(lua ${LIBS})
- SET_TARGET_PROPERTIES(lua PROPERTIES ENABLE_EXPORTS ON)
-ENDIF(WIN32)
-
diff --git a/3rdparty/luv/deps/lua_one.c b/3rdparty/luv/deps/lua_one.c
deleted file mode 100644
index 2531883cc67..00000000000
--- a/3rdparty/luv/deps/lua_one.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-* one.c -- Lua core, libraries, and interpreter in a single file
-*/
-
-/* default is to build the full interpreter */
-#ifndef MAKE_LIB
-#ifndef MAKE_LUAC
-#ifndef MAKE_LUA
-#define MAKE_LIB
-#endif
-#endif
-#endif
-
-/* choose suitable platform-specific features */
-/* some of these may need extra libraries such as -ldl -lreadline -lncurses */
-#if 0
-#define LUA_USE_LINUX
-#define LUA_USE_MACOSX
-#define LUA_USE_POSIX
-#define LUA_ANSI
-#endif
-
-/* no need to change anything below this line ----------------------------- */
-
-/* setup for luaconf.h */
-#if HAVE_LPREFIX
-# include "lprefix.h"
-#endif
-
-#define LUA_CORE
-#define LUA_LIB
-#define ltable_c
-#define lvm_c
-#include "luaconf.h"
-
-/* do not export internal symbols */
-#undef LUAI_FUNC
-#undef LUAI_DDEC
-#undef LUAI_DDEF
-#define LUAI_FUNC static
-#define LUAI_DDEC static
-#define LUAI_DDEF static
-
-/* core -- used by all */
-#include "lapi.c"
-#include "lcode.c"
-#include "lctype.c"
-#include "ldebug.c"
-#include "ldo.c"
-#include "ldump.c"
-#include "lfunc.c"
-#include "lgc.c"
-#include "llex.c"
-#include "lmem.c"
-#include "lobject.c"
-#include "lopcodes.c"
-#include "lparser.c"
-#include "lstate.c"
-#include "lstring.c"
-#include "ltable.c"
-#include "ltm.c"
-#include "lundump.c"
-#include "lvm.c"
-#include "lzio.c"
-
-/* auxiliary library -- used by all */
-#include "lauxlib.c"
-
-/* standard library -- not used by luac */
-#ifndef MAKE_LUAC
-#include "lbaselib.c"
-#if LUA_VERSION_NUM == 502
-# include "lbitlib.c"
-#endif
-#include "lcorolib.c"
-#include "ldblib.c"
-#include "liolib.c"
-#include "lmathlib.c"
-#include "loadlib.c"
-#include "loslib.c"
-#include "lstrlib.c"
-#include "ltablib.c"
-#if LUA_VERSION_NUM >= 503
-# include "lutf8lib.c"
-#endif
-#include "linit.c"
-#endif
-
-/* lua */
-#ifdef MAKE_LUA
-#include "lua.c"
-#endif
-
-/* luac */
-#ifdef MAKE_LUAC
-#include "luac.c"
-#endif
diff --git a/3rdparty/luv/deps/luajit.cmake b/3rdparty/luv/deps/luajit.cmake
deleted file mode 100644
index e9d5b3582e1..00000000000
--- a/3rdparty/luv/deps/luajit.cmake
+++ /dev/null
@@ -1,407 +0,0 @@
-# Added LUAJIT_ADD_EXECUTABLE Ryan Phillips <ryan at trolocsis.com>
-# This CMakeLists.txt has been first taken from LuaDist
-# Copyright (C) 2007-2011 LuaDist.
-# Created by Peter Drahoš
-# Redistribution and use of this file is allowed according to the terms of the MIT license.
-# Debugged and (now seriously) modified by Ronan Collobert, for Torch7
-
-#project(LuaJIT C ASM)
-
-SET(LUAJIT_DIR ${CMAKE_CURRENT_LIST_DIR}/luajit)
-
-SET(CMAKE_REQUIRED_INCLUDES
- ${LUAJIT_DIR}
- ${LUAJIT_DIR}/src
- ${CMAKE_CURRENT_BINARY_DIR}
-)
-
-OPTION(WITH_AMALG "Build eveything in one shot (needs memory)" ON)
-
-# Ugly warnings
-IF(MSVC)
- ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
-ENDIF()
-
-# Various includes
-INCLUDE(CheckLibraryExists)
-INCLUDE(CheckFunctionExists)
-INCLUDE(CheckCSourceCompiles)
-INCLUDE(CheckTypeSize)
-
-# LuaJIT specific
-option(LUAJIT_DISABLE_FFI "Disable FFI." OFF)
-option(LUAJIT_ENABLE_LUA52COMPAT "Enable Lua 5.2 compatibility." ON)
-option(LUAJIT_DISABLE_JIT "Disable JIT." OFF)
-option(LUAJIT_CPU_SSE2 "Use SSE2 instead of x87 instructions." ON)
-option(LUAJIT_CPU_NOCMOV "Disable NOCMOV." OFF)
-MARK_AS_ADVANCED(LUAJIT_DISABLE_FFI LUAJIT_ENABLE_LUA52COMPAT LUAJIT_DISABLE_JIT LUAJIT_CPU_SSE2 LUAJIT_CPU_NOCMOV)
-
-IF(LUAJIT_DISABLE_FFI)
- ADD_DEFINITIONS(-DLUAJIT_DISABLE_FFI)
-ENDIF()
-
-IF(LUAJIT_ENABLE_LUA52COMPAT)
- ADD_DEFINITIONS(-DLUAJIT_ENABLE_LUA52COMPAT)
-ENDIF()
-
-IF(LUAJIT_DISABLE_JIT)
- ADD_DEFINITIONS(-DLUAJIT_DISABLE_JIT)
-ENDIF()
-
-IF(LUAJIT_CPU_SSE2)
- ADD_DEFINITIONS(-DLUAJIT_CPU_SSE2)
-ENDIF()
-
-IF(LUAJIT_CPU_NOCMOV)
- ADD_DEFINITIONS(-DLUAJIT_CPU_NOCMOV)
-ENDIF()
-######
-
-
-CHECK_TYPE_SIZE("void*" SIZEOF_VOID_P)
-IF(SIZEOF_VOID_P EQUAL 8)
- ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE)
-ENDIF()
-
-if ( WIN32 AND NOT CYGWIN )
- add_definitions ( -DLUAJIT_OS=LUAJIT_OS_WINDOWS)
- set ( LJVM_MODE coffasm )
-elseif ( APPLE )
- set ( CMAKE_EXE_LINKER_FLAGS "-pagezero_size 10000 -image_base 100000000 ${CMAKE_EXE_LINKER_FLAGS}" )
- set ( LJVM_MODE machasm )
-else ()
- set ( LJVM_MODE elfasm )
-endif ()
-
-IF(NOT WIN32)
- FIND_LIBRARY(DL_LIBRARY "dl")
- IF(DL_LIBRARY)
- SET(CMAKE_REQUIRED_LIBRARIES ${DL_LIBRARY})
- LIST(APPEND LIBS ${DL_LIBRARY})
- ENDIF(DL_LIBRARY)
- CHECK_FUNCTION_EXISTS(dlopen LUA_USE_DLOPEN)
- IF(NOT LUA_USE_DLOPEN)
- MESSAGE(FATAL_ERROR "Cannot compile a useful lua.
-Function dlopen() seems not to be supported on your platform.
-Apparently you are not on a Windows platform as well.
-So lua has no way to deal with shared libraries!")
- ENDIF(NOT LUA_USE_DLOPEN)
-ENDIF(NOT WIN32)
-
-check_library_exists(m sin "" LUA_USE_LIBM)
-if ( LUA_USE_LIBM )
- list ( APPEND LIBS m )
-endif ()
-
-## SOURCES
-MACRO(LJ_TEST_ARCH stuff)
- CHECK_C_SOURCE_COMPILES("
-#undef ${stuff}
-#include \"lj_arch.h\"
-#if ${stuff}
-int main() { return 0; }
-#else
-#error \"not defined\"
-#endif
-" ${stuff})
-ENDMACRO()
-
-MACRO(LJ_TEST_ARCH_VALUE stuff value)
- CHECK_C_SOURCE_COMPILES("
-#undef ${stuff}
-#include \"lj_arch.h\"
-#if ${stuff} == ${value}
-int main() { return 0; }
-#else
-#error \"not defined\"
-#endif
-" ${stuff}_${value})
-ENDMACRO()
-
-
-FOREACH(arch X64 X86 ARM PPC PPCSPE MIPS)
- LJ_TEST_ARCH(LJ_TARGET_${arch})
- if(LJ_TARGET_${arch})
- STRING(TOLOWER ${arch} TARGET_LJARCH)
- MESSAGE(STATUS "LuaJIT Target: ${TARGET_LJARCH}")
- BREAK()
- ENDIF()
-ENDFOREACH()
-
-IF(NOT TARGET_LJARCH)
- MESSAGE(FATAL_ERROR "architecture not supported")
-ELSE()
- MESSAGE(STATUS "LuaJIT target ${TARGET_LJARCH}")
-ENDIF()
-
-FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/jit)
-FILE(GLOB jit_files ${LUAJIT_DIR}/src/jit/*.lua)
-FILE(COPY ${jit_files} DESTINATION ${CMAKE_BINARY_DIR}/jit)
-
-SET(DASM_ARCH ${TARGET_LJARCH})
-SET(DASM_FLAGS)
-SET(TARGET_ARCH)
-LIST(APPEND TARGET_ARCH "LUAJIT_TARGET=LUAJIT_ARCH_${TARGET_LJARCH}")
-LJ_TEST_ARCH_VALUE(LJ_ARCH_BITS 64)
-IF(LJ_ARCH_BITS_64)
- SET(DASM_FLAGS ${DASM_FLAGS} -D P64)
-ENDIF()
-LJ_TEST_ARCH_VALUE(LJ_HASJIT 1)
-IF(LJ_HASJIT_1)
- SET(DASM_FLAGS ${DASM_FLAGS} -D JIT)
-ENDIF()
-LJ_TEST_ARCH_VALUE(LJ_HASFFI 1)
-IF(LJ_HASFFI_1)
- SET(DASM_FLAGS ${DASM_FLAGS} -D FFI)
-ENDIF()
-LJ_TEST_ARCH_VALUE(LJ_DUALNUM 1)
-IF(LJ_DUALNUM_1)
- SET(DASM_FLAGS ${DASM_FLAGS} -D DUALNUM)
-ENDIF()
-LJ_TEST_ARCH_VALUE(LJ_ARCH_HASFPU 1)
-IF(LJ_ARCH_HASFPU_1)
- SET(DASM_FLAGS ${DASM_FLAGS} -D FPU)
- LIST(APPEND TARGET_ARCH "LJ_ARCH_HASFPU=1")
-ELSE()
- LIST(APPEND TARGET_ARCH "LJ_ARCH_HASFPU=0")
-ENDIF()
-LJ_TEST_ARCH_VALUE(LJ_ABI_SOFTFP 1)
-IF(NOT LJ_ABI_SOFTFP_1)
- SET(DASM_FLAGS ${DASM_FLAGS} -D HFABI)
- LIST(APPEND TARGET_ARCH "LJ_ABI_SOFTFP=0")
-ELSE()
- LIST(APPEND TARGET_ARCH "LJ_ABI_SOFTFP=1")
-ENDIF()
-IF(WIN32)
- SET(DASM_FLAGS ${DASM_FLAGS} -LN -D WIN)
-ENDIF()
-IF(TARGET_LJARCH STREQUAL "x86")
- LJ_TEST_ARCH_VALUE(__SSE2__ 1)
- IF(__SSE2__1)
- SET(DASM_FLAGS ${DASM_FLAGS} -D SSE)
- ENDIF()
-ENDIF()
-IF(TARGET_LJARCH STREQUAL "x64")
- SET(DASM_ARCH "x86")
-ENDIF()
-IF(TARGET_LJARCH STREQUAL "ppc")
- LJ_TEST_ARCH_VALUE(LJ_ARCH_SQRT 1)
- IF(NOT LJ_ARCH_SQRT_1)
- SET(DASM_FLAGS ${DASM_FLAGS} -D SQRT)
- ENDIF()
- LJ_TEST_ARCH_VALUE(LJ_ARCH_PPC64 1)
- IF(NOT LJ_ARCH_PPC64_1)
- SET(DASM_FLAGS ${DASM_FLAGS} -D GPR64)
- ENDIF()
-ENDIF()
-
-add_executable(minilua ${LUAJIT_DIR}/src/host/minilua.c)
-SET_TARGET_PROPERTIES(minilua PROPERTIES COMPILE_DEFINITIONS "${TARGET_ARCH}")
-CHECK_LIBRARY_EXISTS(m sin "" MINILUA_USE_LIBM)
-if(MINILUA_USE_LIBM)
- TARGET_LINK_LIBRARIES(minilua m)
-endif()
-
-add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/buildvm_arch.h
- COMMAND minilua ${LUAJIT_DIR}/dynasm/dynasm.lua ${DASM_FLAGS} -o ${CMAKE_CURRENT_BINARY_DIR}/buildvm_arch.h ${LUAJIT_DIR}/src/vm_${DASM_ARCH}.dasc
- DEPENDS ${LUAJIT_DIR}/dynasm/dynasm.lua minilua
-)
-
-SET(SRC_LJLIB
- ${LUAJIT_DIR}/src/lib_base.c
- ${LUAJIT_DIR}/src/lib_math.c
- ${LUAJIT_DIR}/src/lib_bit.c
- ${LUAJIT_DIR}/src/lib_string.c
- ${LUAJIT_DIR}/src/lib_table.c
- ${LUAJIT_DIR}/src/lib_io.c
- ${LUAJIT_DIR}/src/lib_os.c
- ${LUAJIT_DIR}/src/lib_package.c
- ${LUAJIT_DIR}/src/lib_debug.c
- ${LUAJIT_DIR}/src/lib_jit.c
- ${LUAJIT_DIR}/src/lib_ffi.c)
-
-SET(SRC_LJCORE
- ${LUAJIT_DIR}/src/lj_gc.c
- ${LUAJIT_DIR}/src/lj_err.c
- ${LUAJIT_DIR}/src/lj_char.c
- ${LUAJIT_DIR}/src/lj_buf.c
- ${LUAJIT_DIR}/src/lj_profile.c
- ${LUAJIT_DIR}/src/lj_strfmt.c
- ${LUAJIT_DIR}/src/lj_bc.c
- ${LUAJIT_DIR}/src/lj_obj.c
- ${LUAJIT_DIR}/src/lj_str.c
- ${LUAJIT_DIR}/src/lj_tab.c
- ${LUAJIT_DIR}/src/lj_func.c
- ${LUAJIT_DIR}/src/lj_udata.c
- ${LUAJIT_DIR}/src/lj_meta.c
- ${LUAJIT_DIR}/src/lj_debug.c
- ${LUAJIT_DIR}/src/lj_state.c
- ${LUAJIT_DIR}/src/lj_dispatch.c
- ${LUAJIT_DIR}/src/lj_vmevent.c
- ${LUAJIT_DIR}/src/lj_vmmath.c
- ${LUAJIT_DIR}/src/lj_strscan.c
- ${LUAJIT_DIR}/src/lj_api.c
- ${LUAJIT_DIR}/src/lj_lex.c
- ${LUAJIT_DIR}/src/lj_parse.c
- ${LUAJIT_DIR}/src/lj_bcread.c
- ${LUAJIT_DIR}/src/lj_bcwrite.c
- ${LUAJIT_DIR}/src/lj_load.c
- ${LUAJIT_DIR}/src/lj_ir.c
- ${LUAJIT_DIR}/src/lj_opt_mem.c
- ${LUAJIT_DIR}/src/lj_opt_fold.c
- ${LUAJIT_DIR}/src/lj_opt_narrow.c
- ${LUAJIT_DIR}/src/lj_opt_dce.c
- ${LUAJIT_DIR}/src/lj_opt_loop.c
- ${LUAJIT_DIR}/src/lj_opt_split.c
- ${LUAJIT_DIR}/src/lj_opt_sink.c
- ${LUAJIT_DIR}/src/lj_mcode.c
- ${LUAJIT_DIR}/src/lj_snap.c
- ${LUAJIT_DIR}/src/lj_record.c
- ${LUAJIT_DIR}/src/lj_crecord.c
- ${LUAJIT_DIR}/src/lj_ffrecord.c
- ${LUAJIT_DIR}/src/lj_asm.c
- ${LUAJIT_DIR}/src/lj_trace.c
- ${LUAJIT_DIR}/src/lj_gdbjit.c
- ${LUAJIT_DIR}/src/lj_ctype.c
- ${LUAJIT_DIR}/src/lj_cdata.c
- ${LUAJIT_DIR}/src/lj_cconv.c
- ${LUAJIT_DIR}/src/lj_ccall.c
- ${LUAJIT_DIR}/src/lj_ccallback.c
- ${LUAJIT_DIR}/src/lj_carith.c
- ${LUAJIT_DIR}/src/lj_clib.c
- ${LUAJIT_DIR}/src/lj_cparse.c
- ${LUAJIT_DIR}/src/lj_lib.c
- ${LUAJIT_DIR}/src/lj_alloc.c
- ${LUAJIT_DIR}/src/lj_vmmath.c
- ${LUAJIT_DIR}/src/lib_aux.c
- ${LUAJIT_DIR}/src/lib_init.c
- ${SRC_LJLIB})
-
-SET(SRC_BUILDVM
- ${LUAJIT_DIR}/src/host/buildvm.c
- ${LUAJIT_DIR}/src/host/buildvm_asm.c
- ${LUAJIT_DIR}/src/host/buildvm_peobj.c
- ${LUAJIT_DIR}/src/host/buildvm_lib.c
- ${LUAJIT_DIR}/src/host/buildvm_fold.c
- ${CMAKE_CURRENT_BINARY_DIR}/buildvm_arch.h)
-
-## GENERATE
-ADD_EXECUTABLE(buildvm ${SRC_BUILDVM})
-SET_TARGET_PROPERTIES(buildvm PROPERTIES COMPILE_DEFINITIONS "${TARGET_ARCH}")
-
-macro(add_buildvm_target _target _mode)
- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_target}
- COMMAND buildvm ARGS -m ${_mode} -o ${CMAKE_CURRENT_BINARY_DIR}/${_target} ${ARGN}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- DEPENDS buildvm ${ARGN}
- )
-endmacro(add_buildvm_target)
-
-if (MSVC)
- add_buildvm_target ( lj_vm.obj peobj )
- set (LJ_VM_SRC ${CMAKE_CURRENT_BINARY_DIR}/lj_vm.obj)
-else ()
- add_buildvm_target ( lj_vm.S ${LJVM_MODE} )
- set (LJ_VM_SRC ${CMAKE_CURRENT_BINARY_DIR}/lj_vm.S)
-endif ()
-add_buildvm_target ( lj_ffdef.h ffdef ${SRC_LJLIB} )
-add_buildvm_target ( lj_bcdef.h bcdef ${SRC_LJLIB} )
-add_buildvm_target ( lj_folddef.h folddef ${LUAJIT_DIR}/src/lj_opt_fold.c )
-add_buildvm_target ( lj_recdef.h recdef ${SRC_LJLIB} )
-add_buildvm_target ( lj_libdef.h libdef ${SRC_LJLIB} )
-add_buildvm_target ( vmdef.lua vmdef ${SRC_LJLIB} )
-
-SET(DEPS
- ${LJ_VM_SRC}
- ${CMAKE_CURRENT_BINARY_DIR}/lj_ffdef.h
- ${CMAKE_CURRENT_BINARY_DIR}/lj_bcdef.h
- ${CMAKE_CURRENT_BINARY_DIR}/lj_libdef.h
- ${CMAKE_CURRENT_BINARY_DIR}/lj_recdef.h
- ${CMAKE_CURRENT_BINARY_DIR}/lj_folddef.h
- ${CMAKE_CURRENT_BINARY_DIR}/vmdef.lua
- )
-
-## COMPILE
-include_directories(
- ${LUAJIT_DIR}/dynasm
- ${LUAJIT_DIR}/src
- ${CMAKE_CURRENT_BINARY_DIR}
-)
-
-IF(WITH_SHARED_LUA)
- IF(WITH_AMALG)
- add_library(luajit-5.1 SHARED ${LUAJIT_DIR}/src/ljamalg.c ${DEPS} )
- ELSE()
- add_library(luajit-5.1 SHARED ${SRC_LJCORE} ${DEPS} )
- ENDIF()
- SET_TARGET_PROPERTIES(luajit-5.1 PROPERTIES OUTPUT_NAME "lua51")
-ELSE()
- IF(WITH_AMALG)
- add_library(luajit-5.1 STATIC ${LUAJIT_DIR}/src/ljamalg.c ${DEPS} )
- ELSE()
- add_library(luajit-5.1 STATIC ${SRC_LJCORE} ${DEPS} )
- ENDIF()
- SET_TARGET_PROPERTIES(luajit-5.1 PROPERTIES
- PREFIX "lib" IMPORT_PREFIX "lib" OUTPUT_NAME "luajit")
-ENDIF()
-
-target_link_libraries (luajit-5.1 ${LIBS} )
-
-IF(WIN32)
- add_executable(luajit ${LUAJIT_DIR}/src/luajit.c)
- target_link_libraries(luajit luajit-5.1)
-ELSE()
- IF(WITH_AMALG)
- add_executable(luajit ${LUAJIT_DIR}/src/luajit.c ${LUAJIT_DIR}/src/ljamalg.c ${DEPS})
- ELSE()
- add_executable(luajit ${LUAJIT_DIR}/src/luajit.c ${SRC_LJCORE} ${DEPS})
- ENDIF()
- target_link_libraries(luajit ${LIBS})
- SET_TARGET_PROPERTIES(luajit PROPERTIES ENABLE_EXPORTS ON)
-ENDIF()
-
-MACRO(LUAJIT_add_custom_commands luajit_target)
- SET(target_srcs "")
- FOREACH(file ${ARGN})
- IF(${file} MATCHES ".*\\.lua$")
- set(file "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
- set(source_file ${file})
- string(LENGTH ${CMAKE_SOURCE_DIR} _luajit_source_dir_length)
- string(LENGTH ${file} _luajit_file_length)
- math(EXPR _begin "${_luajit_source_dir_length} + 1")
- math(EXPR _stripped_file_length "${_luajit_file_length} - ${_luajit_source_dir_length} - 1")
- string(SUBSTRING ${file} ${_begin} ${_stripped_file_length} stripped_file)
-
- set(generated_file "${CMAKE_BINARY_DIR}/jitted_tmp/${stripped_file}_${luajit_target}_generated${CMAKE_C_OUTPUT_EXTENSION}")
-
- add_custom_command(
- OUTPUT ${generated_file}
- MAIN_DEPENDENCY ${source_file}
- DEPENDS luajit
- COMMAND luajit
- ARGS -bg
- ${source_file}
- ${generated_file}
- COMMENT "Building Luajitted ${source_file}: ${generated_file}"
- )
-
- get_filename_component(basedir ${generated_file} PATH)
- file(MAKE_DIRECTORY ${basedir})
-
- set(target_srcs ${target_srcs} ${generated_file})
- set_source_files_properties(
- ${generated_file}
- properties
- external_object true # this is an object file
- generated true # to say that "it is OK that the obj-files do not exist before build time"
- )
- ELSE()
- set(target_srcs ${target_srcs} ${file})
- ENDIF(${file} MATCHES ".*\\.lua$")
- ENDFOREACH(file)
-ENDMACRO()
-
-MACRO(LUAJIT_ADD_EXECUTABLE luajit_target)
- LUAJIT_add_custom_commands(${luajit_target} ${ARGN})
- add_executable(${luajit_target} ${target_srcs})
-ENDMACRO(LUAJIT_ADD_EXECUTABLE luajit_target)
diff --git a/3rdparty/luv/deps/uv.cmake b/3rdparty/luv/deps/uv.cmake
deleted file mode 100644
index b6570b26b60..00000000000
--- a/3rdparty/luv/deps/uv.cmake
+++ /dev/null
@@ -1,224 +0,0 @@
-## Modifications
-## Copyright 2014 The Luvit Authors. All Rights Reserved.
-
-## Original Copyright
-# Copyright (c) 2014 David Capello
-#
-# 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(CheckTypeSize)
-
-cmake_minimum_required(VERSION 2.8.9)
-
-set(LIBUVDIR ${CMAKE_CURRENT_LIST_DIR}/libuv)
-
-include_directories(
- ${LIBUVDIR}/src
- ${LIBUVDIR}/include
-)
-
-set(SOURCES
- ${LIBUVDIR}/include/uv.h
- ${LIBUVDIR}/include/tree.h
- ${LIBUVDIR}/include/uv-errno.h
- ${LIBUVDIR}/include/uv-threadpool.h
- ${LIBUVDIR}/include/uv-version.h
- ${LIBUVDIR}/src/fs-poll.c
- ${LIBUVDIR}/src/heap-inl.h
- ${LIBUVDIR}/src/inet.c
- ${LIBUVDIR}/src/queue.h
- ${LIBUVDIR}/src/threadpool.c
- ${LIBUVDIR}/src/uv-common.c
- ${LIBUVDIR}/src/uv-common.h
- ${LIBUVDIR}/src/version.c
-)
-
-if(WIN32)
- add_definitions(
- -D_WIN32_WINNT=0x0600
- -D_CRT_SECURE_NO_WARNINGS
- -D_GNU_SOURCE
- )
- set(SOURCES ${SOURCES}
- ${LIBUVDIR}/include/uv-win.h
- ${LIBUVDIR}/src/win/async.c
- ${LIBUVDIR}/src/win/atomicops-inl.h
- ${LIBUVDIR}/src/win/core.c
- ${LIBUVDIR}/src/win/dl.c
- ${LIBUVDIR}/src/win/error.c
- ${LIBUVDIR}/src/win/fs.c
- ${LIBUVDIR}/src/win/fs-event.c
- ${LIBUVDIR}/src/win/getaddrinfo.c
- ${LIBUVDIR}/src/win/getnameinfo.c
- ${LIBUVDIR}/src/win/handle.c
- ${LIBUVDIR}/src/win/handle-inl.h
- ${LIBUVDIR}/src/win/internal.h
- ${LIBUVDIR}/src/win/loop-watcher.c
- ${LIBUVDIR}/src/win/pipe.c
- ${LIBUVDIR}/src/win/thread.c
- ${LIBUVDIR}/src/win/poll.c
- ${LIBUVDIR}/src/win/process.c
- ${LIBUVDIR}/src/win/process-stdio.c
- ${LIBUVDIR}/src/win/req.c
- ${LIBUVDIR}/src/win/req-inl.h
- ${LIBUVDIR}/src/win/signal.c
- ${LIBUVDIR}/src/win/snprintf.c
- ${LIBUVDIR}/src/win/stream.c
- ${LIBUVDIR}/src/win/stream-inl.h
- ${LIBUVDIR}/src/win/tcp.c
- ${LIBUVDIR}/src/win/tty.c
- ${LIBUVDIR}/src/win/timer.c
- ${LIBUVDIR}/src/win/udp.c
- ${LIBUVDIR}/src/win/util.c
- ${LIBUVDIR}/src/win/winapi.c
- ${LIBUVDIR}/src/win/winapi.h
- ${LIBUVDIR}/src/win/winsock.c
- ${LIBUVDIR}/src/win/winsock.h
- )
-else()
- include_directories(${LIBUVDIR}/src/unix)
- set(SOURCES ${SOURCES}
- ${LIBUVDIR}/include/uv-unix.h
- ${LIBUVDIR}/include/uv-linux.h
- ${LIBUVDIR}/include/uv-sunos.h
- ${LIBUVDIR}/include/uv-darwin.h
- ${LIBUVDIR}/include/uv-bsd.h
- ${LIBUVDIR}/include/uv-aix.h
- ${LIBUVDIR}/src/unix/async.c
- ${LIBUVDIR}/src/unix/atomic-ops.h
- ${LIBUVDIR}/src/unix/core.c
- ${LIBUVDIR}/src/unix/dl.c
- ${LIBUVDIR}/src/unix/fs.c
- ${LIBUVDIR}/src/unix/getaddrinfo.c
- ${LIBUVDIR}/src/unix/getnameinfo.c
- ${LIBUVDIR}/src/unix/internal.h
- ${LIBUVDIR}/src/unix/loop.c
- ${LIBUVDIR}/src/unix/loop-watcher.c
- ${LIBUVDIR}/src/unix/pipe.c
- ${LIBUVDIR}/src/unix/poll.c
- ${LIBUVDIR}/src/unix/process.c
- ${LIBUVDIR}/src/unix/signal.c
- ${LIBUVDIR}/src/unix/spinlock.h
- ${LIBUVDIR}/src/unix/stream.c
- ${LIBUVDIR}/src/unix/tcp.c
- ${LIBUVDIR}/src/unix/thread.c
- ${LIBUVDIR}/src/unix/timer.c
- ${LIBUVDIR}/src/unix/tty.c
- ${LIBUVDIR}/src/unix/udp.c
- )
-endif()
-
-check_type_size("void*" SIZEOF_VOID_P)
-if(SIZEOF_VOID_P EQUAL 8)
- add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE)
-endif()
-
-## Freebsd
-if("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
- set(SOURCES ${SOURCES}
- ${LIBUVDIR}/src/unix/kqueue.c
- ${LIBUVDIR}/src/unix/freebsd.c
- )
-endif()
-
-## Linux
-if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
- add_definitions(
- -D_GNU_SOURCE
- )
- set(SOURCES ${SOURCES}
- ${LIBUVDIR}/src/unix/proctitle.c
- ${LIBUVDIR}/src/unix/linux-core.c
- ${LIBUVDIR}/src/unix/linux-inotify.c
- ${LIBUVDIR}/src/unix/linux-syscalls.c
- ${LIBUVDIR}/src/unix/linux-syscalls.h
- )
-endif()
-
-## SunOS
-if("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
- add_definitions(
- -D__EXTENSIONS__
- -D_XOPEN_SOURCE=500
- )
- set(SOURCES ${SOURCES}
- ${LIBUVDIR}/src/unix/sunos.c
- )
-endif()
-
-## Darwin
-if(APPLE)
- add_definitions(
- -D=_DARWIN_USE_64_BIT_INODE
- )
- set(SOURCES ${SOURCES}
- ${LIBUVDIR}/src/unix/proctitle.c
- ${LIBUVDIR}/src/unix/darwin.c
- ${LIBUVDIR}/src/unix/fsevents.c
- ${LIBUVDIR}/src/unix/darwin-proctitle.c
- ${LIBUVDIR}/src/unix/kqueue.c
- )
-endif()
-
-add_library(uv STATIC ${SOURCES})
-set_property(TARGET uv PROPERTY POSITION_INDEPENDENT_CODE ON)
-
-if("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
- target_link_libraries(uv
- pthread
- kvm
- )
-endif()
-
-if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
- target_link_libraries(uv
- pthread
- )
-endif()
-
-if(WIN32)
- target_link_libraries(uv
- ws2_32.lib
- shell32.lib
- psapi.lib
- iphlpapi.lib
- advapi32.lib
- Userenv.lib
- )
-endif()
-
-if("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
- target_link_libraries(uv
- kstat
- socket
- sendfile
- )
-endif()
-
-if(APPLE)
- find_library(FOUNDATION_LIBRARY Foundation)
- find_library(CORESERVICES_LIBRARY CoreServices)
- find_library(APPLICATION_SERVICES_LIBRARY ApplicationServices)
- target_link_libraries(uv
- ${FOUNDATION_LIBRARY}
- ${CORESERVICES_LIBRARY}
- ${APPLICATION_SERVICES_LIBRARY}
- )
-endif()
diff --git a/3rdparty/luv/docs.md b/3rdparty/luv/docs.md
deleted file mode 100644
index 187dec24ff1..00000000000
--- a/3rdparty/luv/docs.md
+++ /dev/null
@@ -1,1309 +0,0 @@
-# LibUV in Lua
-
-The [luv][] project provides access to the multi-platform support library
-[libuv][] to lua code. It was primariliy developed for the [luvit][] project as
-the `uv` builtin module, but can be used in other lua environments.
-
-### TCP Echo Server Example
-
-Here is a small example showing a TCP echo server:
-
-```lua
-local uv = require('uv')
-
-local server = uv.new_tcp()
-server:bind("127.0.0.1", 1337)
-server:listen(128, function (err)
- assert(not err, err)
- local client = uv.new_tcp()
- server:accept(client)
- client:read_start(function (err, chunk)
- assert(not err, err)
- if chunk then
- client:write(chunk)
- else
- client:shutdown()
- client:close()
- end
- end)
-end)
-print("TCP server listening at 127.0.0.1 port 1337")
-uv.run()
-```
-
-### Methods vs Functions
-
-As a quick note, [libuv][] is a C library and as such, there are no such things
-as methods. The [luv][] bindings allow calling the libuv functions as either
-functions or methods. For example, calling `server:bind(host, port)` is
-equivalent to calling `uv.tcp_bind(server, host, port)`. All wrapped uv types
-in lua have method shortcuts where is makes sense. Some are even renamed
-shorter like the `tcp_` prefix that removed in method form. Under the hood it's
-the exact same C function.
-
-## Table Of Contents
-
-The rest of the docs are organized by libuv type. There is some hierarchy as
-most types are considered handles and some are considered streams.
-
- - [`uv_loop_t`][] — Event loop
- - [`uv_handle_t`][] — Base handle
- - [`uv_timer_t`][] — Timer handle
- - [`uv_prepare_t`][] — Prepare handle
- - [`uv_check_t`][] — Check handle
- - [`uv_idle_t`][] — Idle handle
- - [`uv_async_t`][] — Async handle
- - [`uv_poll_t`][] — Poll handle
- - [`uv_signal_t`][] — Signal handle
- - [`uv_process_t`][] — Process handle
- - [`uv_stream_t`][] — Stream handle
- - [`uv_tcp_t`][] — TCP handle
- - [`uv_pipe_t`][] — Pipe handle
- - [`uv_tty_t`][] — TTY handle
- - [`uv_udp_t`][] — UDP handle
- - [`uv_fs_event_t`][] — FS Event handle
- - [`uv_fs_poll_t`][] — FS Poll handle
- - [Filesystem operations][]
- - [DNS utility functions][]
- - [Miscellaneous utilities][]
-
-## `uv_loop_t` — Event loop
-
-[`uv_loop_t`]: #uv_loop_t--event-loop
-
-The event loop is the central part of libuv’s functionality. It takes care of
-polling for i/o and scheduling callbacks to be run based on different sources of
-events.
-
-In [luv][], there is an implicit uv loop for every lua state that loads the
-library. You can use this library in an multithreaded environment as long as
-each thread has it's own lua state with corresponsding own uv loop.
-
-### `uv.loop_close()`
-
-Closes all internal loop resources. This function must only be called once the
-loop has finished its execution or it will raise a UV_EBUSY error.
-
-### `uv.run([mode])`
-
-> optional `mode` defaults to `"default"`
-
-This function runs the event loop. It will act differently depending on the
-specified mode:
-
- - `"default"`: Runs the event loop until there are no more active and
- referenced handles or requests. Always returns `false`.
-
- - `"once"`: Poll for i/o once. Note that this function blocks if there are no
- pending callbacks. Returns `false` when done (no active handles or requests
- left), or `true` if more callbacks are expected (meaning you should run
- the event loop again sometime in the future).
-
- - `"nowait"`: Poll for i/o once but don’t block if there are no
- pending callbacks. Returns `false` if done (no active handles or requests
- left), or `true` if more callbacks are expected (meaning you should run
- the event loop again sometime in the future).
-
-Luvit will implicitly call `uv.run()` after loading user code, but if you use
-the `luv` bindings directly, you need to call this after registering your
-initial set of event callbacks to start the event loop.
-
-### `uv.loop_alive()`
-
-Returns true if there are active handles or request in the loop.
-
-### `uv.stop()`
-
-Stop the event loop, causing `uv_run()` to end as soon as possible. This
-will happen not sooner than the next loop iteration. If this function was called
-before blocking for i/o, the loop won’t block for i/o on this iteration.
-
-### `uv.backend_fd()`
-
-Get backend file descriptor. Only kqueue, epoll and event ports are supported.
-
-This can be used in conjunction with `uv_run("nowait")` to poll in one thread
-and run the event loop’s callbacks in another.
-
-**Note**: Embedding a kqueue fd in another kqueue pollset doesn’t work on all
-platforms. It’s not an error to add the fd but it never generates events.
-
-### `uv.backend_timeout()`
-
-Get the poll timeout. The return value is in milliseconds, or -1 for no timeout.
-
-### `uv.now()`
-
-Return the current timestamp in milliseconds. The timestamp is cached at the
-start of the event loop tick, see `uv.update_time()` for details and rationale.
-
-The timestamp increases monotonically from some arbitrary point in time. Don’t
-make assumptions about the starting point, you will only get disappointed.
-
-**Note**: Use `uv.hrtime()` if you need sub-millisecond granularity.
-
-### `uv.update_time()`
-
-Update the event loop’s concept of “now”. Libuv caches the current time at the
-start of the event loop tick in order to reduce the number of time-related
-system calls.
-
-You won’t normally need to call this function unless you have callbacks that
-block the event loop for longer periods of time, where “longer” is somewhat
-subjective but probably on the order of a millisecond or more.
-
-### `uv.walk(callback)`
-
-Walk the list of handles: `callback` will be executed with the handle.
-
-```lua
--- Example usage of uv.walk to close all handles that aren't already closing.
-uv.walk(function (handle)
- if not handle:is_closing() then
- handle:close()
- end
-end)
-```
-
-## `uv_handle_t` — Base handle
-
-[`uv_handle_t`]: #uv_handle_t--base-handle
-
-`uv_handle_t` is the base type for all libuv handle types.
-
-Structures are aligned so that any libuv handle can be cast to `uv_handle_t`.
-All API functions defined here work with any handle type.
-
-### `uv.is_active(handle)`
-
-> method form `handle:is_active()`
-
-Returns `true` if the handle is active, `false` if it’s inactive. What “active”
-means depends on the type of handle:
-
- - A [`uv_async_t`][] handle is always active and cannot be deactivated, except
- by closing it with uv_close().
-
- - A [`uv_pipe_t`][], [`uv_tcp_t`][], [`uv_udp_t`][], etc. handlebasically any
- handle that deals with i/ois active when it is doing something that
- involves i/o, like reading, writing, connecting, accepting new connections,
- etc.
-
- - A [`uv_check_t`][], [`uv_idle_t`][], [`uv_timer_t`][], etc. handle is active
- when it has been started with a call to `uv.check_start()`,
- `uv.idle_start()`, etc.
-
-Rule of thumb: if a handle of type `uv_foo_t` has a `uv.foo_start()` function,
-then it’s active from the moment that function is called. Likewise,
-`uv.foo_stop()` deactivates the handle again.
-
-### `uv.is_closing(handle)`
-
-> method form `handle:is_closing()`
-
-Returns `true` if the handle is closing or closed, `false` otherwise.
-
-**Note**: This function should only be used between the initialization of the
-handle and the arrival of the close callback.
-
-### `uv.close(handle, callback)`
-
-> method form `handle:close(callback)`
-
-Request handle to be closed. `callback` will be called asynchronously after this
-call. This MUST be called on each handle before memory is released.
-
-Handles that wrap file descriptors are closed immediately but `callback` will
-still be deferred to the next iteration of the event loop. It gives you a chance
-to free up any resources associated with the handle.
-
-In-progress requests, like `uv_connect_t` or `uv_write_t`, are cancelled and
-have their callbacks called asynchronously with `status=UV_ECANCELED`.
-
-### `uv.ref(handle)`
-
-> method form `handle:ref()`
-
-Reference the given handle. References are idempotent, that is, if a handle is
-already referenced calling this function again will have no effect.
-
-See [Reference counting][].
-
-### `uv.unref(handle)`
-
-> method form `handle:unref()`
-
-Un-reference the given handle. References are idempotent, that is, if a handle
-is not referenced calling this function again will have no effect.
-
-See [Reference counting][].
-
-### `uv.has_ref(handle)`
-
-> method form `handle:has_ref()`
-
-Returns `true` if the handle referenced, `false` otherwise.
-
-See [Reference counting][].
-
-### `uv.send_buffer_size(handle, [size]) -> size`
-
-> method form `handle:send_buffer_size(size)`
-
-Gets or sets the size of the send buffer that the operating system uses for the
-socket.
-
-If `size` is omitted, it will return the current send buffer size, otherwise it
-will use `size` to set the new send buffer size.
-
-This function works for TCP, pipe and UDP handles on Unix and for TCP and UDP
-handles on Windows.
-
-**Note**: Linux will set double the size and return double the size of the
-original set value.
-
-### `uv.recv_buffer_size(handle, [size])`
-
-> method form `handle:recv_buffer_size(size)`
-
-Gets or sets the size of the receive buffer that the operating system uses for
-the socket.
-
-If `size` is omitted, it will return the current receive buffer size, otherwise
-it will use `size` to set the new receive buffer size.
-
-This function works for TCP, pipe and UDP handles on Unix and for TCP and UDP
-handles on Windows.
-
-**Note**: Linux will set double the size and return double the size of the
-original set value.
-
-### `uv.fileno(handle)`
-
-> method form `handle:fileno()`
-
-Gets the platform dependent file descriptor equivalent.
-
-The following handles are supported: TCP, pipes, TTY, UDP and poll. Passing any
-other handle type will fail with UV_EINVAL.
-
-If a handle doesn’t have an attached file descriptor yet or the handle itself
-has been closed, this function will return UV_EBADF.
-
-**Warning**: Be very careful when using this function. libuv assumes it’s in
-control of the file descriptor so any change to it may lead to malfunction.
-
-## Reference counting
-
-[reference counting]: #reference-counting
-
-The libuv event loop (if run in the default mode) will run until there are no
-active and referenced handles left. The user can force the loop to exit early by
-unreferencing handles which are active, for example by calling `uv.unref()`
-after calling `uv.timer_start()`.
-
-A handle can be referenced or unreferenced, the refcounting scheme doesn’t use a
-counter, so both operations are idempotent.
-
-All handles are referenced when active by default, see `uv.is_active()` for a
-more detailed explanation on what being active involves.
-
-## `uv_timer_t` — Timer handle
-
-[`uv_timer_t`]: #uv_timer_t--timer-handle
-
-Timer handles are used to schedule callbacks to be called in the future.
-
-### `uv.new_timer() -> timer`
-
-Creates and initializes a new `uv_timer_t`. Returns the lua userdata wrapping
-it.
-
-```lua
--- Creating a simple setTimeout wrapper
-local function setTimeout(timeout, callback)
- local timer = uv.new_timer()
- timer:start(timeout, 0, function ()
- timer:stop()
- timer:close()
- callback()
- end)
- return timer
-end
-
--- Creating a simple setInterval wrapper
-local function setInterval(interval, callback)
- local timer = uv.new_timer()
- timer:start(interval, interval, function ()
- timer:stop()
- timer:close()
- callback()
- end)
- return timer
-end
-
--- And clearInterval
-local function clearInterval(timer)
- timer:stop()
- timer:close()
-end
-```
-
-### `uv.timer_start(timer, timeout, repeat, callback)`
-
-> method form `timer:start(timeout, repeat, callback)`
-
-Start the timer. `timeout` and `repeat` are in milliseconds.
-
-If `timeout` is zero, the callback fires on the next event loop iteration. If
-`repeat` is non-zero, the callback fires first after timeout milliseconds and
-then repeatedly after repeat milliseconds.
-
-### `uv.timer_stop(timer)`
-
-> method form `timer:stop()`
-
-Stop the timer, the callback will not be called anymore.
-
-### `uv.timer_again(timer)`
-
-> method form `timer:again()`
-
-Stop the timer, and if it is repeating restart it using the repeat value as the
-timeout. If the timer has never been started before it raises `EINVAL`.
-
-### `uv.timer_set_repeat(timer, repeat)`
-
-> method form `timer:set_repeat(repeat)`
-
-Set the repeat value in milliseconds.
-
-**Note**: If the repeat value is set from a timer callback it does not
-immediately take effect. If the timer was non-repeating before, it will have
-been stopped. If it was repeating, then the old repeat value will have been
-used to schedule the next timeout.
-
-### `uv.timer_get_repeat(timer) -> repeat`
-
-> method form `timer:get_repeat() -> repeat`
-
-Get the timer repeat value.
-
-## `uv_prepare_t` — Prepare handle
-
-[`uv_prepare_t`]: #uv_prepare_t--prepare-handle
-
-Prepare handles will run the given callback once per loop iteration, right before polling for i/o.
-
-```lua
-local prepare = uv.new_prepare()
-prepare:start(function()
- print("Before I/O polling")
-end)
-```
-
-### `uv.new_prepare() -> prepare`
-
-Creates and initializes a new `uv_prepare_t`. Returns the lua userdata wrapping
-it.
-
-### `uv.prepare_start(prepare, callback)`
-
-> method form `prepare:start(callback)`
-
-Start the handle with the given callback.
-
-### `uv.prepare_stop(prepare)`
-
-> method form `prepare:stop()`
-
-Stop the handle, the callback will no longer be called.
-
-## `uv_check_t` — Check handle
-
-[`uv_check_t`]: #uv_check_t--check-handle
-
-Check handles will run the given callback once per loop iteration, right after
-polling for i/o.
-
-```lua
-local check = uv.new_check()
-check:start(function()
- print("After I/O polling")
-end)
-```
-
-### `uv.new_check() -> check`
-
-Creates and initializes a new `uv_check_t`. Returns the lua userdata wrapping
-it.
-
-### `uv.check_start(check, callback)`
-
-> method form `check:start(callback)`
-
-Start the handle with the given callback.
-
-### `uv.check_stop(check)`
-
-> method form `check:stop()`
-
-Stop the handle, the callback will no longer be called.
-
-## `uv_idle_t` — Idle handle
-
-[`uv_idle_t`]: #uv_idle_t--idle-handle
-
-Idle handles will run the given callback once per loop iteration, right before
-the [`uv_prepare_t`][] handles.
-
-**Note**: The notable difference with prepare handles is that when there are
-active idle handles, the loop will perform a zero timeout poll instead of
-blocking for i/o.
-
-**Warning**: Despite the name, idle handles will get their callbacks called on
-every loop iteration, not when the loop is actually “idle”.
-
-```lua
-local idle = uv.new_idle()
-idle:start(function()
- print("Before I/O polling, no blocking")
-end)
-```
-### `uv.new_idle() -> idle`
-
-Creates and initializes a new `uv_idle_t`. Returns the lua userdata wrapping
-it.
-
-### `uv.idle_start(idle, callback)`
-
-> method form `idle:start(callback)`
-
-Start the handle with the given callback.
-
-### `uv.idle_stop(check)`
-
-> method form `idle:stop()`
-
-Stop the handle, the callback will no longer be called.
-
-## `uv_async_t` — Async handle
-
-[`uv_async_t`]: #uv_async_t--async-handle
-
-Async handles allow the user to “wakeup” the event loop and get a callback
-called from another thread.
-
-```lua
-local async
-async = uv.new_async(function()
- print("async operation ran")
- async:close()
-end)
-
-async:send()
-```
-
-### `uv.new_async(callback) -> async`
-
-Creates and initializes a new `uv_async_t`. Returns the lua userdata wrapping
-it. A NULL callback is allowed.
-
-**Note**: Unlike other handle initialization functions, it immediately starts
-the handle.
-
-### `uv.async_send(async)`
-
-> method form `async:send()`
-
-Wakeup the event loop and call the async handle’s callback.
-
-**Note**: It’s safe to call this function from any thread. The callback will be
-called on the loop thread.
-
-**Warning**: libuv will coalesce calls to `uv.async_send(async)`, that is, not
-every call to it will yield an execution of the callback, the only guarantee is
-that it will be called at least once. Thus, calling this function may not
-wakeup the event loop if it was already called previously within a short period
-of time.
-
-## `uv_poll_t` — Poll handle
-
-[`uv_poll_t`]: #uv_poll_t--poll-handle
-
-Poll handles are used to watch file descriptors for readability and writability,
-similar to the purpose of [poll(2)](http://linux.die.net/man/2/poll).
-
-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 c-ares
-or libssh2. Using `uv_poll_t` for any other purpose is not recommended;
-`uv_tcp_t`, `uv_udp_t`, etc. provide an implementation that is faster and more
-scalable than what can be achieved with `uv_poll_t`, especially on Windows.
-
-It is possible that poll handles occasionally signal that a file descriptor is
-readable or writable even when it isn’t. The user should therefore always be
-prepared to handle EAGAIN or equivalent when it attempts to read from or write
-to the fd.
-
-It is not okay to have multiple active poll handles for the same socket, this
-can cause libuv to busyloop or otherwise malfunction.
-
-The user should not close a file descriptor while it is being polled by an
-active poll handle. This can cause the handle to report an error, but it might
-also start polling another socket. However the fd can be safely closed
-immediately after a call to `uv.poll_stop()` or `uv.close()`.
-
-**Note** On windows only sockets can be polled with poll handles. On Unix any
-file descriptor that would be accepted by poll(2) can be used.
-
-
-### `uv.new_poll(fd) -> poll`
-
-Initialize the handle using a file descriptor.
-
-The file descriptor is set to non-blocking mode.
-
-### `uv.new_socket_poll(fd) -> poll`
-
-Initialize the handle using a socket descriptor. On Unix this is identical to
-`uv.poll_init()`. On windows it takes a SOCKET handle.
-
-The socket is set to non-blocking mode.
-
-### `uv.poll_start(poll, events, callback)`
-
-> method form `poll:start()`
-
-Starts polling the file descriptor. `events` is `"r"`, `"w"`, or `"rw"` and
-translates to a bitmask 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 events field.
-
-The user should not close the socket while the handle is active. If the user
-does that anyway, the callback may be called reporting an error status, but this
-is not guaranteed.
-
-**Note** Calling `uv.poll_start()`` on a handle that is already active is fine.
-Doing so will update the events mask that is being watched for.
-
-## `uv.poll_stop(poll)`
-
-> method form `poll:stop()`
-
-Stop polling the file descriptor, the callback will no longer be called.
-
-## `uv_signal_t` — Signal handle
-
-[`uv_signal_t`]: #uv_signal_t--signal-handle
-
-Signal handles implement Unix style signal handling on a per-event loop bases.
-
-Reception of some signals is emulated on Windows:
-* SIGINT is normally delivered when the user presses CTRL+C. However, like on
-Unix, it is not generated when terminal raw mode is enabled.
-* SIGBREAK is delivered when the user pressed CTRL + BREAK.
-* SIGHUP is generated when the user closes the console window. On SIGHUP the
-program is given approximately 10 seconds to perform cleanup. After that
-Windows will unconditionally terminate it.
-* SIGWINCH is raised whenever libuv detects that the console has been resized.
-SIGWINCH is emulated by libuv when the program uses a uv_tty_t handle to write
-to the console. SIGWINCH may not always be delivered in a timely manner; libuv
-will only detect size changes when the cursor is being moved. When a readable
-[`uv_tty_t`][] handle is used in raw mode, resizing the console buffer will
-also trigger a SIGWINCH signal.
-
-Watchers for other signals can be successfully created, but these signals are
-never received. These signals are: SIGILL, SIGABRT, SIGFPE, SIGSEGV, SIGTERM
-and SIGKILL.
-
-Calls to raise() or abort() to programmatically raise a signal are not detected
-by libuv; these will not trigger a signal watcher.
-
-**Note**: On Linux SIGRT0 and SIGRT1 (signals 32 and 33) are used by the NPTL
-pthreads library to manage threads. Installing watchers for those signals will
-lead to unpredictable behavior and is strongly discouraged. Future versions of
-libuv may simply reject them.
-
-```lua
--- Create a new signal handler
-local sigint = uv.new_signal()
--- Define a handler function
-uv.signal_start(sigint, "sigint", function(signal)
-print("got " .. signal .. ", shutting down")
-os.exit(1)
-end)
-```
-
-### `uv.new_signal() -> signal`
-
-Creates and initializes a new `uv_signal_t`. Returns the lua userdata wrapping
-it.
-
-### `uv.signal_start(signal, signum, callback)`
-
-> method form `signal:start(signum, callback)`
-
-Start the handle with the given callback, watching for the given signal.
-
-### `uv.signal_stop(signal)`
-
-> method form `signal:stop()`
-
-Stop the handle, the callback will no longer be called.
-
-## `uv_process_t` — Process handle
-
-[`uv_process_t`]: #uv_process_t--process-handle
-
-Process handles will spawn a new process and allow the user to control it and
-establish communication channels with it using streams.
-
-### `uv.disable_stdio_inheritance()`
-
-Disables inheritance for file descriptors / handles that this process inherited
-from its parent. The effect is that child processes spawned by this process
-don’t accidentally inherit these handles.
-
-It is recommended to call this function as early in your program as possible,
-before the inherited file descriptors can be closed or duplicated.
-
-**Note** This function works on a best-effort basis: there is no guarantee that
-libuv can discover all file descriptors that were inherited. In general it does
-a better job on Windows than it does on Unix.
-
-### `uv.spawn(file, options, onexit) -> process, pid`
-
-Initializes the process handle and starts the process. If the process is
-successfully spawned, this function will return the handle and pid of the child
-process.
-
-Possible reasons for failing to spawn would include (but not be limited to) the
-file to execute not existing, not having permissions to use the setuid or setgid
-specified, or not having enough memory to allocate for the new process.
-
-
-```lua
-local stdout = uv.new_pipe(false)
-local stderr = uv.new_pipe(false)
-local stdin = uv.new_pipe(false)
-
-local handle, pid
-
-local function onexit(code, signal)
- p("exit", {code=code,signal=signal})
-end
-
-local function onclose()
- p("close")
-end
-
-local function onread(err, chunk)
- assert(not err, err)
- if (chunk) then
- p("data", {data=chunk})
- else
- p("end")
- end
-end
-
-local function onshutdown()
- uv.close(handle, onclose)
-end
-
-handle, pid = uv.spawn("cat", {
- stdio = {stdin, stdout, stderr}
-}, onexit)
-
-p{
- handle=handle,
- pid=pid
-}
-
-uv.read_start(stdout, onread)
-uv.read_start(stderr, onread)
-uv.write(stdin, "Hello World")
-uv.shutdown(stdin, onshutdown)
-```
-
- - `options.args` - Command line arguments as a list of string. The first string
- should be the path to the program. On Windows this uses CreateProcess which
- concatenates the arguments into a string this can cause some strange errors.
- (See `options.verbatim` below for Windows.)
- - `options.stdio` - Set the file descriptors that will be made available to the
- child process. The convention is that the first entries are stdin, stdout,
- and stderr. (**Note** On Windows file descriptors after the third are
- available to the child process only if the child processes uses the MSVCRT
- runtime.)
- - `options.env` - Set environment variables for the new process.
- - `options.cwd` - Set current working directory for the subprocess.
- - `options.uid` - Set the child process' user id.
- - `options.gid` - Set the child process' group id.
- - `options.verbatim` - If true, do not wrap any arguments in quotes, or perform
- any other escaping, when converting the argument list into a command line
- string. This option is only meaningful on Windows systems. On Unix it is
- silently ignored.
- - `options.detached` - If true, spawn the child process in a detached state -
- this will make it a process group leader, and will effectively enable the
- child to keep running after the parent exits. Note that the child process
- will still keep the parent's event loop alive unless the parent process calls
- `uv.unref()` on the child's process handle.
- - `options.hide` - If true, hide the subprocess console window that would
- normally be created. This option is only meaningful on Windows systems. On
- Unix it is silently ignored.
-
-The `options.stdio` entries can take many shapes.
-
-- If they are numbers, then the child process inherits that same zero-indexed fd
- from the parent process.
-- If `uv_stream_h` handles are passed in, those are used as a read-write pipe or
- inherited stream depending if the stream has a valid fd.
-- Including `nil` placeholders means to ignore that fd in the child.
-
-When the child process exits, the `onexit` callback will be called with exit
-code and signal.
-
-### `uv.process_kill(process, sigmun)`
-
-> method form `process:kill(sigmun)`
-
-Sends the specified signal to the given process handle.
-
-### `uv.kill(pid, sigmun)`
-
-Sends the specified signal to the given PID.
-
-## `uv_stream_t` — Stream handle
-
-[`uv_stream_t`]: #uv_stream_t--stream-handle
-
-Stream handles provide an abstraction of a duplex communication channel.
-[`uv_stream_t`][] is an abstract type, libuv provides 3 stream implementations in
-the form of [`uv_tcp_t`][], [`uv_pipe_t`][] and [`uv_tty_t`][].
-
-### `uv.shutdown(stream, [callback]) -> req`
-
-> (method form `stream:shutdown([callback]) -> req`)
-
-Shutdown the outgoing (write) side of a duplex stream. It waits for pending
-write requests to complete. The callback is called after
-shutdown is complete.
-
-### `uv.listen(stream, backlog, callback)`
-
-> (method form `stream:listen(backlog, callback)`)
-
-Start listening for incoming connections. `backlog` indicates the number of
-connections the kernel might queue, same as `listen(2)`. When a new incoming
-connection is received the callback is called.
-
-### `uv.accept(stream, client_stream)`
-
-> (method form `stream:accept(client_stream)`)
-
-This call is used in conjunction with `uv.listen()` to accept incoming
-connections. Call this function after receiving a callback to accept the
-connection.
-
-When the connection callback is called it is guaranteed that this function
-will complete successfully the first time. If you attempt to use it more than
-once, it may fail. It is suggested to only call this function once per
-connection call.
-
-```lua
-server:listen(128, function (err)
- local client = uv.new_tcp()
- server:accept(client)
-end)
-```
-
-### `uv.read_start(stream, callback)`
-
-> (method form `stream:read_start(callback)`)
-
-Callback is of the form `(err, data)`.
-
-Read data from an incoming stream. The callback will be made several times until
-there is no more data to read or `uv.read_stop()` is called. When we’ve reached
-EOF, `data` will be `nil`.
-
-```lua
-stream:read_start(function (err, chunk)
- if err then
- -- handle read error
- elseif chunk then
- -- handle data
- else
- -- handle disconnect
- end
-end)
-```
-
-### `uv.read_stop(stream)`
-
-> (method form `stream:read_stop()`)
-
-Stop reading data from the stream. The read callback will no longer be called.
-
-### `uv.write(stream, data, [callback])`
-
-> (method form `stream:write(data, [callback])`)
-
-Write data to stream.
-
-`data` can either be a lua string or a table of strings. If a table is passed
-in, the C backend will use writev to send all strings in a single system call.
-
-The optional `callback` is for knowing when the write is
-complete.
-
-### `uv.write2(stream, data, send_handle, callback)`
-
-> (method form `stream:write2(data, send_handle, callback)`)
-
-Extended write function for sending handles over a pipe. The pipe must be
-initialized with ip option to `true`.
-
-**Note: `send_handle` must be a TCP socket or pipe, which is a server or a
-connection (listening or connected state). Bound sockets or pipes will be
-assumed to be servers.
-
-### `uv.try_write(stream, data)`
-
-> (method form `stream:try_write(data)`)
-
-Same as `uv.write()`, but won’t queue a write request if it can’t be completed
-immediately.
-
-Will return number of bytes written (can be less than the supplied buffer size).
-
-### `uv.is_readable(stream)`
-
-> (method form `stream:is_readable()`)
-
-Returns `true` if the stream is readable, `false` otherwise.
-
-### `uv.is_writable(stream)`
-
-> (method form `stream:is_writable()`)
-
-Returns `true` if the stream is writable, `false` otherwise.
-
-### `uv.stream_set_blocking(stream, blocking)`
-
-> (method form `stream:set_blocking(blocking)`)
-
-Enable or disable blocking mode for a stream.
-
-When blocking mode is enabled all writes complete synchronously. The interface
-remains unchanged otherwise, e.g. completion or failure of the operation will
-still be reported through a callback which is made asynchronously.
-
-**Warning**: Relying too much on this API is not recommended. It is likely to
-change significantly in the future. Currently this only works on Windows and
-only for uv_pipe_t handles. Also libuv currently makes no ordering guarantee
-when the blocking mode is changed after write requests have already been
-submitted. Therefore it is recommended to set the blocking mode immediately
-after opening or creating the stream.
-
-## `uv_tcp_t` — TCP handle
-
-[`uv_tcp_t`]: #uv_tcp_t--tcp-handle
-
-TCP handles are used to represent both TCP streams and servers.
-
-`uv_tcp_t` is a ‘subclass’ of [`uv_stream_t`][](#uv_stream_t--stream-handle).
-
-### `uv.new_tcp() -> tcp`
-
-Creates and initializes a new `uv_tcp_t`. Returns the lua userdata wrapping it.
-
-### `uv.tcp_open(tcp, sock)`
-
-> (method form `tcp:open(sock)`)
-
-Open an existing file descriptor or SOCKET as a TCP handle.
-
-**Note: The user is responsible for setting the file descriptor in non-blocking
-mode.
-
-### `uv.tcp_nodelay(tcp, enable)`
-
-> (method form `tcp:nodelay(enable)`)
-
-Enable / disable Nagle’s algorithm.
-
-### `uv.tcp_keepalive(tcp, enable, [delay])`
-
-> (method form `tcp:keepalive(enable, [delay])`)
-
-Enable / disable TCP keep-alive. `delay` is the initial delay in seconds, ignored
-when enable is `false`.
-
-### `uv.tcp_simultaneous_accepts(tcp, enable)`
-
-> (method form `tcp:simultaneous_accepts(enable)`)
-
-Enable / disable simultaneous asynchronous accept requests that are queued by
-the operating system when listening for new TCP connections.
-
-This setting is used to tune a TCP server for the desired performance. Having
-simultaneous accepts can significantly improve the rate of accepting connections
-(which is why it is enabled by default) but may lead to uneven load distribution
-in multi-process setups.
-
-### `uv.tcp_bind(tcp, address, port)`
-
-> (method form `tcp:bind(address, port)`)
-
-Bind the handle to an address and port. `address` should be an IP address and
-not a domain name.
-
-When the port is already taken, you can expect to see an UV_EADDRINUSE error
-from either `uv.tcp_bind()`, `uv.listen()` or `uv.tcp_connect()`. That is, a
-successful call to this function does not guarantee that the call to `uv.listen()`
-or `uv.tcp_connect()` will succeed as well.
-
-Use a port of `0` to let the OS assign an ephemeral port. You can look it up
-later using `uv.tcp_getsockname()`.
-
-### `uv.tcp_getsockname(tcp)`
-
-> (method form `tcp:getsockname()`)
-
-Get the current address to which the handle is bound.
-
-### `uv.tcp_getpeername(tcp)`
-
-> (method form `tcp:getpeername()`)
-
-Get the address of the peer connected to the handle.
-
-### `uv.tcp_connect(tcp, address, port, callback) -> req`
-
-> (method form `tcp:connect(host, port, callback) -> req`)
-
-### `uv.tcp_write_queue_size(tcp) -> size`
-
-> (method form `tcp:write_queue_size() -> size`)
-
-Establish an IPv4 or IPv6 TCP connection.
-
-The callback is made when the connection has been established or when a
-connection error happened.
-
-```lua
-local client = uv.new_tcp()
-client:connect("127.0.0.1", 8080, function (err)
- -- check error and carry on.
-end)
-```
-
-## `uv_pipe_t` — Pipe handle
-
-[`uv_pipe_t`]: #uv_pipe_t--pipe-handle
-
-Pipe handles provide an abstraction over local domain sockets on Unix and named
-pipes on Windows.
-
-```lua
-local pipe = uv.new_pipe(false)
-
-pipe:bind('/tmp/sock.test')
-
-pipe:listen(128, function()
- local client = uv.new_pipe(false)
- pipe:accept(client)
- client:write("hello!\n")
- client:close()
-end)
-```
-
-### `uv.new_pipe(ipc) -> pipe`
-
-Creates and initializes a new `uv_pipe_t`. Returns the lua userdata wrapping
-it. The `ipc` argument is a boolean to indicate if this pipe will be used for
-handle passing between processes.
-
-### `uv.pipe_open(file) -> pipe`
-
-Open an existing file descriptor or [`uv_handle_t`][] as a pipe.
-
-**Note**: The file descriptor is set to non-blocking mode.
-
-### `uv.pipe_bind(pipe, name)`
-
-> (method form `pipe:bind(name)`)
-
-Bind the pipe to a file path (Unix) or a name (Windows).
-
-**Note**: Paths on Unix get truncated to sizeof(sockaddr_un.sun_path) bytes,
-typically between 92 and 108 bytes.
-
-### `uv.pipe_connect(pipe, name, callback)`
-
-> (method form `pipe:connect(name, callback)`)
-
-Connect to the Unix domain socket or the named pipe.
-
-**Note**: Paths on Unix get truncated to sizeof(sockaddr_un.sun_path) bytes,
-typically between 92 and 108 bytes.
-
-### `uv.pipe_getsockname(pipe)`
-
-> (method form `pipe:getsockname()`)
-
-Returns the name of the Unix domain socket or the named pipe.
-
-### `uv.pipe_pending_instances(pipe, count)`
-
-> (method form `pipe:pending_instances(count)`)
-
-Set the number of pending pipe instance handles when the pipe server is waiting for connections.
-
-**Note**: This setting applies to Windows only.
-
-### `uv.pipe_pending_count(pipe)`
-
-> (method form `pipe:pending_count()`)
-
-Returns the pending pipe count for the named pipe.
-
-### `uv.pipe_pending_type(pipe)`
-
-> (method form `pipe:pending_type()`)
-
-Used to receive handles over IPC pipes.
-
-First - call [`uv.pipe_pending_count`][], if it’s > 0 then initialize a handle
-of the given type, returned by [`uv.pipe_pending_type`][] and call
-[`uv.accept(pipe, handle)`][].
-
-## `uv_tty_t` — TTY handle
-
-[`uv_tty_t`]: #uv_tty_t--tty-handle
-
-TTY handles represent a stream for the console.
-
-```lua
--- Simple echo program
-local stdin = uv.new_tty(0, true)
-local stdout = uv.new_tty(1, false)
-
-stdin:read_start(function (err, data)
- assert(not err, err)
- if data then
- stdout:write(data)
- else
- stdin:close()
- stdout:close()
- end
-end)
-```
-
-### uv.new_tty(fd, readable) -> tty
-
-Initialize a new TTY stream with the given file descriptor. Usually the file
-descriptor will be:
-
- - 0 - stdin
- - 1 - stdout
- - 2 - stderr
-
-`readable, specifies if you plan on calling 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.
-
-Note: If opening `/dev/tty` fails, libuv falls back to blocking writes for
-non-readable TTY streams.
-
-### uv.tty_set_mode(mode)
-
-> (method form `tty:set_mode(mode)`)
-
-Set the TTY using the specified terminal mode.
-
-Parameter `mode` is a C enum with the following values:
-
-- 0 - UV_TTY_MODE_NORMAL: Initial/normal terminal mode
-
-- 1 - UV_TTY_MODE_RAW: Raw input mode (On Windows, ENABLE_WINDOW_INPUT is
- also enabled)
-
-- 2 - UV_TTY_MODE_IO: Binary-safe I/O mode for IPC (Unix-only)
-
-## uv.tty_reset_mode()
-
-To be called when the program exits. Resets TTY settings to default values for
-the next process to take over.
-
-This function is async signal-safe on Unix platforms but can fail with error
-code UV_EBUSY if you call it when execution is inside uv_tty_set_mode().
-
-## uv.tty_get_winsize() -> w, h
-
-> (method form `tty:get_winsize() -> w, h`)
-
-Gets the current Window size.
-
-## `uv_udp_t` — UDP handle
-
-[`uv_udp_t`]: #uv_udp_t--udp-handle
-
-UDP handles encapsulate UDP communication for both clients and servers.
-
-### uv.new_udp() -> udp
-
-Initialize a new UDP handle. The actual socket is created lazily.
-
-### uv.udp_open(udp, fd)
-
-> (method form `udp:open(fd)`)
-
-Opens an existing file descriptor or Windows SOCKET as a UDP handle.
-
-Unix only: The only requirement of the sock argument is that it follows the
-datagram contract (works in unconnected mode, supports sendmsg()/recvmsg(),
-etc). In other words, other datagram-type sockets like raw sockets or netlink
-sockets can also be passed to this function.
-
-The file descriptor is set to non-blocking mode.
-
-Note: The passed file descriptor or SOCKET is not checked for its type, but
-it’s required that it represents a valid datagram socket.
-
-### uv.udp_bind(udp, host, port)
-
-> (method form `udp:bind(host, port)`)
-
-Bind the UDP handle to an IP address and port.
-
-### uv.udp_getsockname(udp)
-
-> (method form `udp:getsockname()`)
-
-Get the local IP and port of the UDP handle.
-
-### uv.udp_set_membership(udp, multicast_addr, interface_addr, membership)
-
-> (method form `udp:set_membership(multicast_addr, interface_addr, membership)`)
-
-Set membership for a multicast address.
-
-`multicast_addr` is multicast address to set membership for.
-
-`interface_addr` is interface address.
-
-`membership` can be the string `"leave"` or `"join"`.
-
-### uv.udp_set_multicast_loop(udp, on)
-
-> (method form `udp:set_multicast_loop(on)`)
-
-Set IP multicast loop flag. Makes multicast packets loop back to local
-sockets.
-
-`on` is a boolean.
-
-### uv.udp_set_multicast_ttl(udp, tty)
-
-> (method form `udp:set_multicast_ttl(tty)`)
-
-Set the multicast ttl.
-
-`ttl` is an integer 1 through 255.
-
-### uv.udp_set_multicast_interface(udp, interface_addr)
-
-> (method form `udp:set_multicast_interface(interface_addr)`)
-
-Set the multicast interface to send or receive data on.
-
-### uv.udp_set_broadcast(udp, on)
-
-Set broadcast on or off.
-
-> (method form `udp:set_broadcast(, on)`)
-
-### uv.udp_set_ttl(udp, ttl)
-
-> (method form `udp:set_ttl(ttl)`)
-
-Set the time to live.
-
-`ttl` is an integer 1 through 255.
-
-### uv.udp_send(udp, data, host, port, callback)
-
-> (method form `udp:send(data, host, port, callback)`)
-
-Send data over the UDP socket. If the socket has not previously been bound
-with `uv_udp_bind()` it will be bound to `0.0.0.0` (the “all interfaces” IPv4
-address) and a random port number.
-
-### uv.udp_try_send(udp, data, host, port)
-
-> (method form `udp:try_send(data, host, port)`)
-
-Same as `uv_udp_send()`, but won’t queue a send request if it can’t be
-completed immediately.
-
-### uv.udp_recv_start(udp, callback)
-
-> (method form `udp:recv_start(callback)`)
-
-Prepare for receiving data. If the socket has not previously been bound with
-`uv_udp_bind()` it is bound to `0.0.0.0` (the “all interfaces” IPv4 address)
-and a random port number.
-
-### uv.udp_recv_stop(udp)
-
-> (method form `udp:recv_stop()`)
-
-## `uv_fs_event_t` — FS Event handle
-
-[`uv_fs_event_t`]: #uv_fs_event_t--fs-event-handle
-
-**TODO**: port docs from [docs.libuv.org](http://docs.libuv.org/en/v1.x/fs_event.html)
-using [functions](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L174-L177)
-and [methods](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L265-L270)
-from [fs_event.c](https://github.com/luvit/luv/blob/master/src/fs_event.c)
-
-## `uv_fs_poll_t` — FS Poll handle
-
-[`uv_fs_poll_t`]: #uv_fs_poll_t--fs-poll-handle
-
-**TODO**: port docs from [docs.libuv.org](http://docs.libuv.org/en/v1.x/fs_poll.html)
-using [functions](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L180-L183)
-and [methods](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L272-L277)
-from [fs_poll.c](https://github.com/luvit/luv/blob/master/src/fs_poll.c)
-
-## Filesystem operations
-
-[Filesystem operations]:#filesystem-operations
-
-**TODO**: port docs from [docs.libuv.org](http://docs.libuv.org/en/v1.x/fs.html)
-using [functions](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L186-L213)
-from [fs.c](https://github.com/luvit/luv/blob/master/src/fs.c)
-
-## DNS utility functions
-
-[DNS utility functions]: #dns-utility-functions
-
-**TODO**: port docs from [docs.libuv.org](http://docs.libuv.org/en/v1.x/dns.html)
-using [functions](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L216-L217)
-from [dns.c](https://github.com/luvit/luv/blob/master/src/dns.c)
-
-## Miscellaneous utilities
-
-[Miscellaneous utilities]: #miscellaneous-utilities
-
-**TODO**: port docs from [docs.libuv.org](http://docs.libuv.org/en/v1.x/misc.html)
-using [functions](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L220-L235)
-from [misc.c](https://github.com/luvit/luv/blob/master/src/misc.c)
-
-[luv]: https://github.com/luvit/luv
-[luvit]: https://github.com/luvit/luvit
-[libuv]: https://github.com/libuv/libuv
diff --git a/3rdparty/luv/examples/cqueues-main.lua b/3rdparty/luv/examples/cqueues-main.lua
deleted file mode 100644
index ff60ec2b1c9..00000000000
--- a/3rdparty/luv/examples/cqueues-main.lua
+++ /dev/null
@@ -1,31 +0,0 @@
---[[
-Demonstrates using luv with a cqueues mainloop
-]]
-
-local cqueues = require "cqueues"
-local uv = require "luv"
-
-local cq = cqueues.new()
-
-cq:wrap(function()
- while cqueues.poll({
- pollfd = uv.backend_fd();
- timeout = uv.backend_timeout() / 1000;
- events = "r";
- }) do
- uv.run("nowait")
- end
-end)
-
-cq:wrap(function()
- while true do
- cqueues.sleep(1)
- print("HELLO FROM CQUEUES")
- end
-end)
-
-uv.new_timer():start(1000, 1000, function()
- print("HELLO FROM LUV")
-end)
-
-assert(cq:loop())
diff --git a/3rdparty/luv/examples/cqueues-slave.lua b/3rdparty/luv/examples/cqueues-slave.lua
deleted file mode 100644
index 599e7c6ded7..00000000000
--- a/3rdparty/luv/examples/cqueues-slave.lua
+++ /dev/null
@@ -1,55 +0,0 @@
---[[
-Demonstrates using cqueues with a luv mainloop
-
-Starts a simple sleep+print loop using each library's native form.
-They should print intertwined.
-]]
-
-local cqueues = require "cqueues"
-local uv = require "luv"
-
-local cq = cqueues.new()
-
-do
- local timer = uv.new_timer()
- local function reset_timer()
- local timeout = cq:timeout()
- if timeout then
- -- libuv takes milliseconds as an integer,
- -- while cqueues gives timeouts as a floating point number
- -- use `math.ceil` as we'd rather wake up late than early
- timer:set_repeat(math.ceil(timeout * 1000))
- timer:again()
- else
- -- stop timer for now; it may be restarted later.
- timer:stop()
- end
- end
- local function onready()
- -- Step the cqueues loop once (sleeping for max 0 seconds)
- assert(cq:step(0))
- reset_timer()
- end
- -- Need to call `start` on libuv timer now
- -- to provide callback and so that `again` works
- timer:start(0, 0, onready)
- -- Ask libuv to watch the cqueue pollfd
- uv.new_poll(cq:pollfd()):start(cq:events(), onready)
-end
-
--- Adds a new function to the scheduler `cq`
--- The functions is an infinite loop that sleeps for 1 second and prints
-cq:wrap(function()
- while true do
- cqueues.sleep(1)
- print("HELLO FROM CQUEUES")
- end
-end)
-
--- Start a luv timer that fires every 1 second
-uv.new_timer():start(1000, 1000, function()
- print("HELLO FROM LUV")
-end)
-
--- Run luv mainloop
-uv.run()
diff --git a/3rdparty/luv/examples/echo-server-client.lua b/3rdparty/luv/examples/echo-server-client.lua
deleted file mode 100644
index ea4e6d2132d..00000000000
--- a/3rdparty/luv/examples/echo-server-client.lua
+++ /dev/null
@@ -1,68 +0,0 @@
-local p = require('lib/utils').prettyPrint
-local uv = require('luv')
-
-local function create_server(host, port, on_connection)
-
- local server = uv.new_tcp()
- p(1, server)
- uv.tcp_bind(server, host, port)
-
- uv.listen(server, 128, function(err)
- assert(not err, err)
- local client = uv.new_tcp()
- uv.accept(server, client)
- on_connection(client)
- end)
-
- return server
-end
-
-local server = create_server("0.0.0.0", 0, function (client)
- p("new client", client, uv.tcp_getsockname(client), uv.tcp_getpeername(client))
- uv.read_start(client, function (err, chunk)
- p("onread", {err=err,chunk=chunk})
-
- -- Crash on errors
- assert(not err, err)
-
- if chunk then
- -- Echo anything heard
- uv.write(client, chunk)
- else
- -- When the stream ends, close the socket
- uv.close(client)
- end
- end)
-end)
-
-local address = uv.tcp_getsockname(server)
-p("server", server, address)
-
-local client = uv.new_tcp()
-uv.tcp_connect(client, "127.0.0.1", address.port, function (err)
- assert(not err, err)
-
- uv.read_start(client, function (err, chunk)
- p("received at client", {err=err,chunk=chunk})
- assert(not err, err)
- if chunk then
- uv.shutdown(client)
- p("client done shutting down")
- else
- uv.close(client)
- uv.close(server)
- end
- end)
-
- p("writing from client")
- uv.write(client, "Hello")
- uv.write(client, "World")
-
-end)
-
--- Start the main event loop
-uv.run()
--- Close any stray handles when done
-uv.walk(uv.close)
-uv.run()
-uv.loop_close()
diff --git a/3rdparty/luv/examples/killing-children.lua b/3rdparty/luv/examples/killing-children.lua
deleted file mode 100644
index 6aab693d0c1..00000000000
--- a/3rdparty/luv/examples/killing-children.lua
+++ /dev/null
@@ -1,24 +0,0 @@
-local p = require('lib/utils').prettyPrint
-local uv = require('luv')
-
-
-
-local child, pid
-child, pid = uv.spawn("sleep", {
- args = {"100"}
-}, function (code, signal)
- p("EXIT", {code=code,signal=signal})
- uv.close(child)
-end)
-
-p{child=child, pid=pid}
-
--- uv.kill(pid, "SIGTERM")
-uv.process_kill(child, "SIGTERM")
-
-repeat
- print("\ntick.")
-until uv.run('once') == 0
-
-print("done")
-
diff --git a/3rdparty/luv/examples/lots-o-dns.lua b/3rdparty/luv/examples/lots-o-dns.lua
deleted file mode 100644
index 59a1b0fe534..00000000000
--- a/3rdparty/luv/examples/lots-o-dns.lua
+++ /dev/null
@@ -1,49 +0,0 @@
-local p = require('lib/utils').prettyPrint
-local uv = require('luv')
-
-uv.getaddrinfo(nil, 80, nil, p)
-
-local domains = {
- "facebook.com",
- "google.com",
- "mail.google.com",
- "maps.google.com",
- "plus.google.com",
- "play.google.com",
- "apple.com",
- "hp.com",
- "yahoo.com",
- "mozilla.com",
- "developer.mozilla.com",
- "luvit.io",
- "creationix.com",
- "howtonode.org",
- "github.com",
- "gist.github.com"
-}
-
-local i = 1
-local function next()
- uv.getaddrinfo(domains[i], nil, {
- v4mapped = true,
- all = true,
- addrconfig = true,
- canonname = true,
- numericserv = true,
- socktype = "STREAM"
- }, function (err, data)
- assert(not err, err)
- p(data)
- i = i + 1
- if i <= #domains then
- next()
- end
- end)
-end
-next();
-
-repeat
- print("\nTick..")
-until uv.run('once') == 0
-
-print("done")
diff --git a/3rdparty/luv/examples/repl.lua b/3rdparty/luv/examples/repl.lua
deleted file mode 100644
index 92be0f17d87..00000000000
--- a/3rdparty/luv/examples/repl.lua
+++ /dev/null
@@ -1,89 +0,0 @@
-local uv = require('luv')
-local utils = require('lib/utils')
-
-if uv.guess_handle(0) ~= "tty" or
- uv.guess_handle(1) ~= "tty" then
- error "stdio must be a tty"
-end
-local stdin = uv.new_tty(0, true)
-local stdout = require('lib/utils').stdout
-
-local debug = require('debug')
-local c = utils.color
-
-local function gatherResults(success, ...)
- local n = select('#', ...)
- return success, { n = n, ... }
-end
-
-local function printResults(results)
- for i = 1, results.n do
- results[i] = utils.dump(results[i])
- end
- print(table.concat(results, '\t'))
-end
-
-local buffer = ''
-
-local function evaluateLine(line)
- if line == "<3\n" then
- print("I " .. c("Bred") .. "♥" .. c() .. " you too!")
- return '>'
- end
- local chunk = buffer .. line
- local f, err = loadstring('return ' .. chunk, 'REPL') -- first we prefix return
-
- if not f then
- f, err = loadstring(chunk, 'REPL') -- try again without return
- end
-
- if f then
- buffer = ''
- local success, results = gatherResults(xpcall(f, debug.traceback))
-
- if success then
- -- successful call
- if results.n > 0 then
- printResults(results)
- end
- else
- -- error
- print(results[1])
- end
- else
-
- if err:match "'<eof>'$" then
- -- Lua expects some more input; stow it away for next time
- buffer = chunk .. '\n'
- return '>>'
- else
- print(err)
- buffer = ''
- end
- end
-
- return '>'
-end
-
-local function displayPrompt(prompt)
- uv.write(stdout, prompt .. ' ')
-end
-
-local function onread(err, line)
- if err then error(err) end
- if line then
- local prompt = evaluateLine(line)
- displayPrompt(prompt)
- else
- uv.close(stdin)
- end
-end
-
-coroutine.wrap(function()
- displayPrompt '>'
- uv.read_start(stdin, onread)
-end)()
-
-uv.run()
-
-print("")
diff --git a/3rdparty/luv/examples/talking-to-children.lua b/3rdparty/luv/examples/talking-to-children.lua
deleted file mode 100644
index 10a53ef8c88..00000000000
--- a/3rdparty/luv/examples/talking-to-children.lua
+++ /dev/null
@@ -1,47 +0,0 @@
-local p = require('lib/utils').prettyPrint
-local uv = require('luv')
-
-local stdout = uv.new_pipe(false)
-local stderr = uv.new_pipe( false)
-local stdin = uv.new_pipe(false)
-
-local handle, pid
-
-local function onexit(code, signal)
- p("exit", {code=code,signal=signal})
-end
-
-local function onclose()
- p("close")
-end
-
-local function onread(err, chunk)
- assert(not err, err)
- if (chunk) then
- p("data", {data=chunk})
- else
- p("end")
- end
-end
-
-local function onshutdown()
- uv.close(handle, onclose)
-end
-
-handle, pid = uv.spawn("cat", {
- stdio = {stdin, stdout, stderr}
-}, onexit)
-
-p{
- handle=handle,
- pid=pid
-}
-
-uv.read_start(stdout, onread)
-uv.read_start(stderr, onread)
-uv.write(stdin, "Hello World")
-uv.shutdown(stdin, onshutdown)
-
-uv.run()
-uv.walk(uv.close)
-uv.run()
diff --git a/3rdparty/luv/examples/tcp-cluster.lua b/3rdparty/luv/examples/tcp-cluster.lua
deleted file mode 100644
index e69ceffc62d..00000000000
--- a/3rdparty/luv/examples/tcp-cluster.lua
+++ /dev/null
@@ -1,84 +0,0 @@
-
--- This function will be run in a child process
-local child_code = string.dump(function ()
- local p = require('lib/utils').prettyPrint
- local uv = require('luv')
-
- -- The parent is going to pass us the server handle over a pipe
- -- This will be our local file descriptor at PIPE_FD
- local pipe = uv.new_pipe(true)
- local pipe_fd = tonumber(os.getenv("PIPE_FD"))
- assert(uv.pipe_open(pipe, pipe_fd))
-
- -- Configure the server handle
- local server = uv.new_tcp()
- local function onconnection()
- local client = uv.new_tcp()
- uv.accept(server, client)
- p("New TCP", client, "on", server)
- p{client=client}
- uv.write(client, "BYE!\n");
- uv.shutdown(client, function ()
- uv.close(client)
- uv.close(server)
- end)
- end
-
- -- Read the server handle from the parent
- local function onread(err, data)
- p("onread", {err=err,data=data})
- assert(not err, err)
- if uv.pipe_pending_count(pipe) > 0 then
- local pending_type = uv.pipe_pending_type(pipe)
- p("pending_type", pending_type)
- assert(pending_type == "tcp")
- assert(uv.accept(pipe, server))
- assert(uv.listen(server, 128, onconnection))
- p("Received server handle from parent process", server)
- elseif data then
- p("ondata", data)
- else
- p("onend", data)
- end
- end
- uv.read_start(pipe, onread)
-
- -- Start the event loop!
- uv.run()
-end)
-
-local p = require('lib/utils').prettyPrint
-local uv = require('luv')
-
-local exepath = assert(uv.exepath())
-local cpu_count = # assert(uv.cpu_info())
-
-local server = uv.new_tcp()
-assert(uv.tcp_bind(server, "::1", 1337))
-print("Master process bound to TCP port 1337 on ::1")
-
-
-local function onexit(status, signal)
- p("Child exited", {status=status,signal=signal})
-end
-
-local function spawnChild()
- local pipe = uv.new_pipe(true)
- local input = uv.new_pipe(false)
- local _, pid = assert(uv.spawn(exepath, {
- stdio = {input,1,2,pipe},
- env= {"PIPE_FD=3"}
- }, onexit))
- uv.write(input, child_code)
- uv.shutdown(input)
- p("Spawned child", pid, "and sending handle", server)
- assert(uv.write2(pipe, "123", server))
- assert(uv.shutdown(pipe))
-end
-
--- Spawn a child process for each CPU core
-for _ = 1, cpu_count do
- spawnChild()
-end
-
-uv.run()
diff --git a/3rdparty/luv/examples/timers.lua b/3rdparty/luv/examples/timers.lua
deleted file mode 100644
index 049235e6fb1..00000000000
--- a/3rdparty/luv/examples/timers.lua
+++ /dev/null
@@ -1,68 +0,0 @@
-local p = require('lib/utils').prettyPrint
-local uv = require('luv')
-
-local function set_timeout(timeout, callback)
- local timer = uv.new_timer()
- local function ontimeout()
- p("ontimeout", timer)
- uv.timer_stop(timer)
- uv.close(timer)
- callback(timer)
- end
- uv.timer_start(timer, timeout, 0, ontimeout)
- return timer
-end
-
-local function clear_timeout(timer)
- uv.timer_stop(timer)
- uv.close(timer)
-end
-
-local function set_interval(interval, callback)
- local timer = uv.new_timer()
- local function ontimeout()
- p("interval", timer)
- callback(timer)
- end
- uv.timer_start(timer, interval, interval, ontimeout)
- return timer
-end
-
-local clear_interval = clear_timeout
-
-local i = set_interval(300, function()
- print("interval...")
-end)
-
-set_timeout(1000, function()
- clear_interval(i)
-end)
-
-
-local handle = uv.new_timer()
-local delay = 1024
-local function ontimeout()
- p("tick", delay)
- delay = delay / 2
- if delay >= 1 then
- uv.timer_set_repeat(handle, delay)
- uv.timer_again(handle)
- else
- uv.timer_stop(handle)
- uv.close(handle)
- p("done")
- end
-end
-uv.timer_start(handle, delay, 0, ontimeout)
-
-
-repeat
- print("\ntick.")
-until uv.run('once') == 0
-
-print("done")
-
-uv.walk(uv.close)
-uv.run()
-uv.loop_close()
-
diff --git a/3rdparty/luv/examples/uvbook/helloworld.lua b/3rdparty/luv/examples/uvbook/helloworld.lua
deleted file mode 100644
index 2c77d0c51bc..00000000000
--- a/3rdparty/luv/examples/uvbook/helloworld.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-local uv = require('luv')
-
-print('Now quitting.')
-uv.run('default')
-uv.loop_close()
diff --git a/3rdparty/luv/examples/uvbook/idle-basic.lua b/3rdparty/luv/examples/uvbook/idle-basic.lua
deleted file mode 100644
index dc2a47b3c30..00000000000
--- a/3rdparty/luv/examples/uvbook/idle-basic.lua
+++ /dev/null
@@ -1,14 +0,0 @@
-local uv = require('luv')
-
-local counter = 0
-local idle = uv.new_idle()
-idle:start(function()
- counter = counter + 1
- if counter >= 10e6 then
- idle:stop()
- end
-end)
-
-print("Idling...")
-uv.run('default')
-uv.loop_close() \ No newline at end of file
diff --git a/3rdparty/luv/examples/uvbook/onchange.lua b/3rdparty/luv/examples/uvbook/onchange.lua
deleted file mode 100644
index 07b3f9b1d78..00000000000
--- a/3rdparty/luv/examples/uvbook/onchange.lua
+++ /dev/null
@@ -1,30 +0,0 @@
-local uv = require('luv')
-
-if #arg==0 then
- print(string.format("Usage: %s <command> <file1> [file2 ...]",arg[0]));
- return
-end
-
-for i=1,#arg do
- local fse = uv.new_fs_event()
- assert(uv.fs_event_start(fse,arg[i],{
- --"watch_entry"=true,"stat"=true,
- recursive=true
- },function (err,fname,status)
- if(err) then
- print("Error "..err)
- else
- print(string.format('Change detected in %s',
- uv.fs_event_getpath(fse)))
- for k,v in pairs(status) do
- print(k,v)
- end
- print('file changed:'..(fname and fname or ''))
- end
- end))
-
-end
-
-uv.run('default')
-uv.loop_close()
-
diff --git a/3rdparty/luv/examples/uvbook/queue-work.lua b/3rdparty/luv/examples/uvbook/queue-work.lua
deleted file mode 100644
index cf52abfb216..00000000000
--- a/3rdparty/luv/examples/uvbook/queue-work.lua
+++ /dev/null
@@ -1,19 +0,0 @@
-local uv = require('luv')
-
-local ctx = uv.new_work(
- function(n) --work,in threadpool
- local uv = require('luv')
- local t = uv.thread_self()
- uv.sleep(100)
- return n*n,n
- end,
- function(r,n) print(string.format('%d => %d',n,r)) end --after work, in loop thread
-)
-uv.queue_work(ctx,2)
-uv.queue_work(ctx,4)
-uv.queue_work(ctx,6)
-uv.queue_work(ctx,8)
-uv.queue_work(ctx,10)
-
-uv.run('default')
-uv.loop_close()
diff --git a/3rdparty/luv/examples/uvbook/tcp-echo-client.lua b/3rdparty/luv/examples/uvbook/tcp-echo-client.lua
deleted file mode 100644
index 40dd22a311f..00000000000
--- a/3rdparty/luv/examples/uvbook/tcp-echo-client.lua
+++ /dev/null
@@ -1,21 +0,0 @@
-local uv = require('luv')
-
-
-local client = uv.new_tcp()
-uv.tcp_connect(client, "127.0.0.1", 1337, function (err)
- assert(not err, err)
- uv.read_start(client, function (err, chunk)
- assert(not err, err)
- if chunk then
- print(chunk)
- else
- uv.close(client)
- end
- end)
-
- uv.write(client, "Hello")
- uv.write(client, "World")
-end)
-print('CTRL-C to break')
-uv.run('default')
-uv.loop_close()
diff --git a/3rdparty/luv/examples/uvbook/tcp-echo-server.lua b/3rdparty/luv/examples/uvbook/tcp-echo-server.lua
deleted file mode 100644
index 269c49114cf..00000000000
--- a/3rdparty/luv/examples/uvbook/tcp-echo-server.lua
+++ /dev/null
@@ -1,22 +0,0 @@
-local uv = require('luv')
-
-
-local server = uv.new_tcp()
-server:bind("127.0.0.1", 1337)
-server:listen(128, function (err)
- assert(not err, err)
- local client = uv.new_tcp()
- server:accept(client)
- client:read_start(function (err, chunk)
- assert(not err, err)
- if chunk then
- client:write(chunk)
- else
- client:shutdown()
- client:close()
- end
- end)
-end)
-
-uv.run('default')
-uv.loop_close()
diff --git a/3rdparty/luv/examples/uvbook/thread-create.lua b/3rdparty/luv/examples/uvbook/thread-create.lua
deleted file mode 100644
index 4b42587adbf..00000000000
--- a/3rdparty/luv/examples/uvbook/thread-create.lua
+++ /dev/null
@@ -1,38 +0,0 @@
-local uv = require('luv')
-
-local step = 10
-
-local hare_id = uv.new_thread(function(step,...)
- local ffi = require'ffi'
- local uv = require('luv')
- local sleep
- if ffi.os=='Windows' then
- ffi.cdef "void Sleep(int ms);"
- sleep = ffi.C.Sleep
- else
- ffi.cdef "unsigned int usleep(unsigned int seconds);"
- sleep = ffi.C.usleep
- end
- while (step>0) do
- step = step - 1
- uv.sleep(math.random(1000))
- print("Hare ran another step")
- end
- print("Hare done running!")
-end, step,true,'abcd','false')
-
-local tortoise_id = uv.new_thread(function(step,...)
- local uv = require('luv')
- while (step>0) do
- step = step - 1
- uv.sleep(math.random(100))
- print("Tortoise ran another step")
- end
- print("Tortoise done running!")
-end,step,'abcd','false')
-
-print(hare_id==hare_id,uv.thread_equal(hare_id,hare_id))
-print(tortoise_id==hare_id,uv.thread_equal(tortoise_id,hare_id))
-
-uv.thread_join(hare_id)
-uv.thread_join(tortoise_id)
diff --git a/3rdparty/luv/examples/uvbook/uvcat.lua b/3rdparty/luv/examples/uvbook/uvcat.lua
deleted file mode 100644
index 99fdd68000b..00000000000
--- a/3rdparty/luv/examples/uvbook/uvcat.lua
+++ /dev/null
@@ -1,37 +0,0 @@
-local uv = require('luv')
-
-
-local fname = arg[1] and arg[1] or arg[0]
-
-uv.fs_open(fname, 'r', tonumber('644', 8), function(err,fd)
- if err then
- print("error opening file:"..err)
- else
- local stat = uv.fs_fstat(fd)
- local off = 0
- local block = 10
-
- local function on_read(err,chunk)
- if(err) then
- print("Read error: "..err);
- elseif #chunk==0 then
- uv.fs_close(fd)
- else
- off = block + off
- uv.fs_write(1,chunk,-1,function(err,chunk)
- if err then
- print("Write error: "..err)
- else
- uv.fs_read(fd, block, off, on_read)
- end
- end)
- end
- end
- uv.fs_read(fd, block, off, on_read)
- end
-end)
-
-
-
-uv.run('default')
-uv.loop_close()
diff --git a/3rdparty/luv/examples/uvbook/uvtee.lua b/3rdparty/luv/examples/uvbook/uvtee.lua
deleted file mode 100644
index c91b066ae21..00000000000
--- a/3rdparty/luv/examples/uvbook/uvtee.lua
+++ /dev/null
@@ -1,35 +0,0 @@
-local uv = require('luv')
-
-if not arg[1] then
- print(string.format("please run %s filename",arg[0]))
- return
-end
-
-
-local stdin = uv.new_tty(0, true)
-local stdout = uv.new_tty(1, true)
---local stdin_pipe = uv.new_pipe(false)
---uv.pipe_open(stdin_pipe,0)
-
-local fname = arg[1]
-
-uv.fs_open(fname, 'w+', tonumber('644', 8), function(err,fd)
- if err then
- print("error opening file:"..err)
- else
- local fpipe = uv.new_pipe(false)
- uv.pipe_open(fpipe, fd)
-
- uv.read_start(stdin, function(err,chunk)
- if err then
- print('Read error: '..err)
- else
- uv.write(stdout,chunk)
- uv.write(fpipe,chunk)
- end
- end);
- end
-end)
-
-uv.run('default')
-uv.loop_close()
diff --git a/3rdparty/luv/lib/tap.lua b/3rdparty/luv/lib/tap.lua
deleted file mode 100644
index d1cfb59c249..00000000000
--- a/3rdparty/luv/lib/tap.lua
+++ /dev/null
@@ -1,165 +0,0 @@
-local uv = require('luv')
-local dump = require('lib/utils').dump
-local stdout = require('lib/utils').stdout
-
-local function protect(...)
- local n = select('#', ...)
- local arguments = {...}
- for i = 1, n do
- arguments[i] = tostring(arguments[i])
- end
-
- local text = table.concat(arguments, "\t")
- text = " " .. string.gsub(text, "\n", "\n ")
- print(text)
-end
-
-local function pprotect(...)
- local n = select('#', ...)
- local arguments = { ... }
-
- for i = 1, n do
- arguments[i] = dump(arguments[i])
- end
-
- protect(table.concat(arguments, "\t"))
-end
-
-
-local tests = {};
-
-local function run()
- local passed = 0
-
- if #tests < 1 then
- error("No tests specified!")
- end
-
- print("1.." .. #tests)
- for i = 1, #tests do
- local test = tests[i]
- local cwd = uv.cwd()
- local pass, err = xpcall(function ()
- local expected = 0
- local function expect(fn, count)
- expected = expected + (count or 1)
- return function (...)
- expected = expected - 1
- local ret = fn(...)
- collectgarbage()
- return ret
- end
- end
- test.fn(protect, pprotect, expect, uv)
- collectgarbage()
- uv.run()
- collectgarbage()
- if expected > 0 then
- error("Missing " .. expected .. " expected call" .. (expected == 1 and "" or "s"))
- elseif expected < 0 then
- error("Found " .. -expected .. " unexpected call" .. (expected == -1 and "" or "s"))
- end
- collectgarbage()
- local unclosed = 0
- uv.walk(function (handle)
- if handle == stdout then return end
- unclosed = unclosed + 1
- print("UNCLOSED", handle)
- end)
- if unclosed > 0 then
- error(unclosed .. " unclosed handle" .. (unclosed == 1 and "" or "s"))
- end
- if uv.cwd() ~= cwd then
- error("Test moved cwd from " .. cwd .. " to " .. uv.cwd())
- end
- collectgarbage()
- end, debug.traceback)
-
- -- Flush out any more opened handles
- uv.stop()
- uv.walk(function (handle)
- if handle == stdout then return end
- if not uv.is_closing(handle) then uv.close(handle) end
- end)
- uv.run()
- uv.chdir(cwd)
-
- if pass then
- print("ok " .. i .. " " .. test.name)
- passed = passed + 1
- else
- protect(err)
- print("not ok " .. i .. " " .. test.name)
- end
- end
-
- local failed = #tests - passed
- if failed == 0 then
- print("# All tests passed")
- else
- print("#" .. failed .. " failed test" .. (failed == 1 and "" or "s"))
- end
-
- -- Close all then handles, including stdout
- uv.walk(uv.close)
- uv.run()
-
- os.exit(-failed)
-end
-
-local single = true
-local prefix
-
-local function tap(suite)
-
- if type(suite) == "function" then
- -- Pass in suite directly for single mode
- suite(function (name, fn)
- if prefix then
- name = prefix .. ' - ' .. name
- end
- tests[#tests + 1] = {
- name = name,
- fn = fn
- }
- end)
- prefix = nil
- elseif type(suite) == "string" then
- prefix = suite
- single = false
- else
- -- Or pass in false to collect several runs of tests
- -- And then pass in true in a later call to flush tests queue.
- single = suite
- end
-
- if single then run() end
-
-end
-
-
---[[
--- Sample Usage
-
-local passed, failed, total = tap(function (test)
-
- test("add 1 to 2", function(print)
- print("Adding 1 to 2")
- assert(1 + 2 == 3)
- end)
-
- test("close handle", function (print, p, expect, uv)
- local handle = uv.new_timer()
- uv.close(handle, expect(function (self)
- assert(self == handle)
- end))
- end)
-
- test("simulate failure", function ()
- error("Oopsie!")
- end)
-
-end)
-]]
-
-return tap
diff --git a/3rdparty/luv/lib/utils.lua b/3rdparty/luv/lib/utils.lua
deleted file mode 100644
index 777879ec28c..00000000000
--- a/3rdparty/luv/lib/utils.lua
+++ /dev/null
@@ -1,165 +0,0 @@
-
-local uv = require('luv')
-local utils = {}
-local usecolors
-
-if uv.guess_handle(1) == "tty" then
- utils.stdout = uv.new_tty(1, false)
- usecolors = true
-else
- utils.stdout = uv.new_pipe(false)
- uv.pipe_open(utils.stdout, 1)
- usecolors = false
-end
-
-local colors = {
- black = "0;30",
- red = "0;31",
- green = "0;32",
- yellow = "0;33",
- blue = "0;34",
- magenta = "0;35",
- cyan = "0;36",
- white = "0;37",
- B = "1;",
- Bblack = "1;30",
- Bred = "1;31",
- Bgreen = "1;32",
- Byellow = "1;33",
- Bblue = "1;34",
- Bmagenta = "1;35",
- Bcyan = "1;36",
- Bwhite = "1;37"
-}
-
-function utils.color(color_name)
- if usecolors then
- return "\27[" .. (colors[color_name] or "0") .. "m"
- else
- return ""
- end
-end
-
-function utils.colorize(color_name, string, reset_name)
- return utils.color(color_name) .. tostring(string) .. utils.color(reset_name)
-end
-
-local backslash, null, newline, carriage, tab, quote, quote2, obracket, cbracket
-
-function utils.loadColors(n)
- if n ~= nil then usecolors = n end
- backslash = utils.colorize("Bgreen", "\\\\", "green")
- null = utils.colorize("Bgreen", "\\0", "green")
- newline = utils.colorize("Bgreen", "\\n", "green")
- carriage = utils.colorize("Bgreen", "\\r", "green")
- tab = utils.colorize("Bgreen", "\\t", "green")
- quote = utils.colorize("Bgreen", '"', "green")
- quote2 = utils.colorize("Bgreen", '"')
- obracket = utils.colorize("B", '[')
- cbracket = utils.colorize("B", ']')
-end
-
-utils.loadColors()
-
-function utils.dump(o, depth)
- local t = type(o)
- if t == 'string' then
- return quote .. o:gsub("\\", backslash):gsub("%z", null):gsub("\n", newline):gsub("\r", carriage):gsub("\t", tab) .. quote2
- end
- if t == 'nil' then
- return utils.colorize("Bblack", "nil")
- end
- if t == 'boolean' then
- return utils.colorize("yellow", tostring(o))
- end
- if t == 'number' then
- return utils.colorize("blue", tostring(o))
- end
- if t == 'userdata' then
- return utils.colorize("magenta", tostring(o))
- end
- if t == 'thread' then
- return utils.colorize("Bred", tostring(o))
- end
- if t == 'function' then
- return utils.colorize("cyan", tostring(o))
- end
- if t == 'cdata' then
- return utils.colorize("Bmagenta", tostring(o))
- end
- if t == 'table' then
- if type(depth) == 'nil' then
- depth = 0
- end
- if depth > 1 then
- return utils.colorize("yellow", tostring(o))
- end
- local indent = (" "):rep(depth)
-
- -- Check to see if this is an array
- local is_array = true
- local i = 1
- for k,v in pairs(o) do
- if not (k == i) then
- is_array = false
- end
- i = i + 1
- end
-
- local first = true
- local lines = {}
- i = 1
- local estimated = 0
- for k,v in (is_array and ipairs or pairs)(o) do
- local s
- if is_array then
- s = ""
- else
- if type(k) == "string" and k:find("^[%a_][%a%d_]*$") then
- s = k .. ' = '
- else
- s = '[' .. utils.dump(k, 100) .. '] = '
- end
- end
- s = s .. utils.dump(v, depth + 1)
- lines[i] = s
- estimated = estimated + #s
- i = i + 1
- end
- if estimated > 200 then
- return "{\n " .. indent .. table.concat(lines, ",\n " .. indent) .. "\n" .. indent .. "}"
- else
- return "{ " .. table.concat(lines, ", ") .. " }"
- end
- end
- -- This doesn't happen right?
- return tostring(o)
-end
-
-
-
--- Print replacement that goes through libuv. This is useful on windows
--- to use libuv's code to translate ansi escape codes to windows API calls.
-function print(...)
- local n = select('#', ...)
- local arguments = {...}
- for i = 1, n do
- arguments[i] = tostring(arguments[i])
- end
- uv.write(utils.stdout, table.concat(arguments, "\t") .. "\n")
-end
-
--- A nice global data dumper
-function utils.prettyPrint(...)
- local n = select('#', ...)
- local arguments = { ... }
-
- for i = 1, n do
- arguments[i] = utils.dump(arguments[i])
- end
-
- print(table.concat(arguments, "\t"))
-end
-
-return utils
-
diff --git a/3rdparty/luv/luv-1.8.0-4.rockspec b/3rdparty/luv/luv-1.8.0-4.rockspec
deleted file mode 100644
index 23855203e0d..00000000000
--- a/3rdparty/luv/luv-1.8.0-4.rockspec
+++ /dev/null
@@ -1,34 +0,0 @@
-package = "luv"
-version = "1.8.0-4"
-source = {
- url = 'https://github.com/luvit/luv/releases/download/1.8.0-4/luv-1.8.0-4.tar.gz',
-}
-
-description = {
- summary = "Bare libuv bindings for lua",
- detailed = [[
-libuv bindings for luajit and lua 5.1/5.2/5.3.
-
-This library makes libuv available to lua scripts. It was made for the luvit
-project but should usable from nearly any lua project.
- ]],
- homepage = "https://github.com/luvit/luv",
- license = "Apache 2.0"
-}
-
-dependencies = {
- "lua >= 5.1"
-}
-
-build = {
- type = 'cmake',
- variables = {
- CMAKE_C_FLAGS="$(CFLAGS)",
- CMAKE_MODULE_LINKER_FLAGS="$(LIBFLAG)",
- LUA_LIBDIR="$(LUA_LIBDIR)",
- LUA_INCDIR="$(LUA_INCDIR)",
- LUA="$(LUA)",
- LIBDIR="$(LIBDIR)",
- LUADIR="$(LUADIR)",
- },
-}
diff --git a/3rdparty/luv/msvcbuild.bat b/3rdparty/luv/msvcbuild.bat
deleted file mode 100644
index 7a5c7bd4c31..00000000000
--- a/3rdparty/luv/msvcbuild.bat
+++ /dev/null
@@ -1,13 +0,0 @@
-@echo off
-
-set VS=12
-if "%configuration%"=="2015" (set VS=14)
-if "%configuration%"=="2013" (set VS=12)
-
-if not defined platform set platform=x64
-if "%platform%" EQU "x64" (set VS=%VS% Win64)
-
-cmake -H. -Bbuild -G"Visual Studio %VS%"
-cmake --build build --config Release
-copy build\Release\luv.dll .
-copy build\Release\luajit.exe .
diff --git a/3rdparty/luv/src/async.c b/3rdparty/luv/src/async.c
deleted file mode 100644
index 87ae0cc0460..00000000000
--- a/3rdparty/luv/src/async.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-#include "lthreadpool.h"
-
-static uv_async_t* luv_check_async(lua_State* L, int index) {
- uv_async_t* handle = luv_checkudata(L, index, "uv_async");
- luaL_argcheck(L, handle->type == UV_ASYNC && handle->data, index, "Expected uv_async_t");
- return handle;
-}
-
-static void luv_async_cb(uv_async_t* handle) {
- lua_State* L = luv_state(handle->loop);
- luv_handle_t* data = handle->data;
- int n = luv_thread_arg_push(L, data->extra);
- luv_call_callback(L, data, LUV_ASYNC, n);
- luv_thread_arg_clear(data->extra);
-}
-
-static int luv_new_async(lua_State* L) {
- uv_async_t* handle;
- luv_handle_t* data;
- int ret;
- luaL_checktype(L, 1, LUA_TFUNCTION);
- handle = luv_newuserdata(L, sizeof(*handle));
- ret = uv_async_init(luv_loop(L), handle, luv_async_cb);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- data = luv_setup_handle(L);
- data->extra = malloc(sizeof(luv_thread_arg_t));
- memset(data->extra, 0, sizeof(luv_thread_arg_t));
- handle->data = data;
- luv_check_callback(L, handle->data, LUV_ASYNC, 1);
- return 1;
-}
-
-static int luv_async_send(lua_State* L) {
- int ret;
- uv_async_t* handle = luv_check_async(L, 1);
- luv_thread_arg_t* arg = ((luv_handle_t*) handle->data)->extra;
-
- luv_thread_arg_set(L, arg, 2, lua_gettop(L), 0);
- ret = uv_async_send(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
diff --git a/3rdparty/luv/src/check.c b/3rdparty/luv/src/check.c
deleted file mode 100644
index dbd330ae255..00000000000
--- a/3rdparty/luv/src/check.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static uv_check_t* luv_check_check(lua_State* L, int index) {
- uv_check_t* handle = luv_checkudata(L, index, "uv_check");
- luaL_argcheck(L, handle->type == UV_CHECK && handle->data, index, "Expected uv_check_t");
- return handle;
-}
-
-static int luv_new_check(lua_State* L) {
- uv_check_t* handle = luv_newuserdata(L, sizeof(*handle));
- int ret = uv_check_init(luv_loop(L), handle);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static void luv_check_cb(uv_check_t* handle) {
- lua_State* L = luv_state(handle->loop);
- luv_handle_t* data = handle->data;
- luv_call_callback(L, data, LUV_CHECK, 0);
-}
-
-static int luv_check_start(lua_State* L) {
- uv_check_t* handle = luv_check_check(L, 1);
- int ret;
- luv_check_callback(L, handle->data, LUV_CHECK, 2);
- ret = uv_check_start(handle, luv_check_cb);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_check_stop(lua_State* L) {
- uv_check_t* handle = luv_check_check(L, 1);
- int ret = uv_check_stop(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
diff --git a/3rdparty/luv/src/constants.c b/3rdparty/luv/src/constants.c
deleted file mode 100644
index 3417028c438..00000000000
--- a/3rdparty/luv/src/constants.c
+++ /dev/null
@@ -1,649 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "luv.h"
-
-static int luv_constants(lua_State* L) {
- lua_newtable(L);
-
- // File open bitwise flags O_*
-#ifdef O_RDONLY
- lua_pushinteger(L, O_RDONLY);
- lua_setfield(L, -2, "O_RDONLY");
-#endif
-#ifdef O_WRONLY
- lua_pushinteger(L, O_WRONLY);
- lua_setfield(L, -2, "O_WRONLY");
-#endif
-#ifdef O_RDWR
- lua_pushinteger(L, O_RDWR);
- lua_setfield(L, -2, "O_RDWR");
-#endif
-#ifdef O_APPEND
- lua_pushinteger(L, O_APPEND);
- lua_setfield(L, -2, "O_APPEND");
-#endif
-#ifdef O_CREAT
- lua_pushinteger(L, O_CREAT);
- lua_setfield(L, -2, "O_CREAT");
-#endif
-#ifdef O_DSYNC
- lua_pushinteger(L, O_DSYNC);
- lua_setfield(L, -2, "O_DSYNC");
-#endif
-#ifdef O_EXCL
- lua_pushinteger(L, O_EXCL);
- lua_setfield(L, -2, "O_EXCL");
-#endif
-#ifdef O_EXLOCK
- lua_pushinteger(L, O_EXLOCK);
- lua_setfield(L, -2, "O_EXLOCK");
-#endif
-#ifdef O_NOCTTY
- lua_pushinteger(L, O_NOCTTY);
- lua_setfield(L, -2, "O_NOCTTY");
-#endif
-#ifdef O_NONBLOCK
- lua_pushinteger(L, O_NONBLOCK);
- lua_setfield(L, -2, "O_NONBLOCK");
-#endif
-#ifdef O_RSYNC
- lua_pushinteger(L, O_RSYNC);
- lua_setfield(L, -2, "O_RSYNC");
-#endif
-#ifdef O_SYNC
- lua_pushinteger(L, O_SYNC);
- lua_setfield(L, -2, "O_SYNC");
-#endif
-#ifdef O_TRUNC
- lua_pushinteger(L, O_TRUNC);
- lua_setfield(L, -2, "O_TRUNC");
-#endif
-
- // Socket types SOCK_*
-#ifdef SOCK_STREAM
- lua_pushinteger(L, SOCK_STREAM);
- lua_setfield(L, -2, "SOCK_STREAM");
-#endif
-#ifdef SOCK_DGRAM
- lua_pushinteger(L, SOCK_DGRAM);
- lua_setfield(L, -2, "SOCK_DGRAM");
-#endif
-#ifdef SOCK_SEQPACKET
- lua_pushinteger(L, SOCK_SEQPACKET);
- lua_setfield(L, -2, "SOCK_SEQPACKET");
-#endif
-#ifdef SOCK_RAW
- lua_pushinteger(L, SOCK_RAW);
- lua_setfield(L, -2, "SOCK_RAW");
-#endif
-#ifdef SOCK_RDM
- lua_pushinteger(L, SOCK_RDM);
- lua_setfield(L, -2, "SOCK_RDM");
-#endif
-
- // AF_*
-#ifdef AF_UNIX
- lua_pushinteger(L, AF_UNIX);
- lua_setfield(L, -2, "AF_UNIX");
-#endif
-#ifdef AF_INET
- lua_pushinteger(L, AF_INET);
- lua_setfield(L, -2, "AF_INET");
-#endif
-#ifdef AF_INET6
- lua_pushinteger(L, AF_INET6);
- lua_setfield(L, -2, "AF_INET6");
-#endif
-#ifdef AF_IPX
- lua_pushinteger(L, AF_IPX);
- lua_setfield(L, -2, "AF_IPX");
-#endif
-#ifdef AF_NETLINK
- lua_pushinteger(L, AF_NETLINK);
- lua_setfield(L, -2, "AF_NETLINK");
-#endif
-#ifdef AF_X25
- lua_pushinteger(L, AF_X25);
- lua_setfield(L, -2, "AF_X25");
-#endif
-#ifdef AF_AX25
- lua_pushinteger(L, AF_AX25);
- lua_setfield(L, -2, "AF_AX25");
-#endif
-#ifdef AF_ATMPVC
- lua_pushinteger(L, AF_ATMPVC);
- lua_setfield(L, -2, "AF_ATMPVC");
-#endif
-#ifdef AF_APPLETALK
- lua_pushinteger(L, AF_APPLETALK);
- lua_setfield(L, -2, "AF_APPLETALK");
-#endif
-#ifdef AF_PACKET
- lua_pushinteger(L, AF_PACKET);
- lua_setfield(L, -2, "AF_PACKET");
-#endif
-
- // AI_*
-#ifdef AI_ADDRCONFIG
- lua_pushinteger(L, AI_ADDRCONFIG);
- lua_setfield(L, -2, "AI_ADDRCONFIG");
-#endif
-#ifdef AI_V4MAPPED
- lua_pushinteger(L, AI_V4MAPPED);
- lua_setfield(L, -2, "AI_V4MAPPED");
-#endif
-#ifdef AI_ALL
- lua_pushinteger(L, AI_ALL);
- lua_setfield(L, -2, "AI_ALL");
-#endif
-#ifdef AI_NUMERICHOST
- lua_pushinteger(L, AI_NUMERICHOST);
- lua_setfield(L, -2, "AI_NUMERICHOST");
-#endif
-#ifdef AI_PASSIVE
- lua_pushinteger(L, AI_PASSIVE);
- lua_setfield(L, -2, "AI_PASSIVE");
-#endif
-#ifdef AI_NUMERICSERV
- lua_pushinteger(L, AI_NUMERICSERV);
- lua_setfield(L, -2, "AI_NUMERICSERV");
-#endif
-
- // Signals
-#ifdef SIGHUP
- lua_pushinteger(L, SIGHUP);
- lua_setfield(L, -2, "SIGHUP");
-#endif
-#ifdef SIGINT
- lua_pushinteger(L, SIGINT);
- lua_setfield(L, -2, "SIGINT");
-#endif
-#ifdef SIGQUIT
- lua_pushinteger(L, SIGQUIT);
- lua_setfield(L, -2, "SIGQUIT");
-#endif
-#ifdef SIGILL
- lua_pushinteger(L, SIGILL);
- lua_setfield(L, -2, "SIGILL");
-#endif
-#ifdef SIGTRAP
- lua_pushinteger(L, SIGTRAP);
- lua_setfield(L, -2, "SIGTRAP");
-#endif
-#ifdef SIGABRT
- lua_pushinteger(L, SIGABRT);
- lua_setfield(L, -2, "SIGABRT");
-#endif
-#ifdef SIGIOT
- lua_pushinteger(L, SIGIOT);
- lua_setfield(L, -2, "SIGIOT");
-#endif
-#ifdef SIGBUS
- lua_pushinteger(L, SIGBUS);
- lua_setfield(L, -2, "SIGBUS");
-#endif
-#ifdef SIGFPE
- lua_pushinteger(L, SIGFPE);
- lua_setfield(L, -2, "SIGFPE");
-#endif
-#ifdef SIGKILL
- lua_pushinteger(L, SIGKILL);
- lua_setfield(L, -2, "SIGKILL");
-#endif
-#ifdef SIGUSR1
- lua_pushinteger(L, SIGUSR1);
- lua_setfield(L, -2, "SIGUSR1");
-#endif
-#ifdef SIGSEGV
- lua_pushinteger(L, SIGSEGV);
- lua_setfield(L, -2, "SIGSEGV");
-#endif
-#ifdef SIGUSR2
- lua_pushinteger(L, SIGUSR2);
- lua_setfield(L, -2, "SIGUSR2");
-#endif
-#ifdef SIGPIPE
- lua_pushinteger(L, SIGPIPE);
- lua_setfield(L, -2, "SIGPIPE");
-#endif
-#ifdef SIGALRM
- lua_pushinteger(L, SIGALRM);
- lua_setfield(L, -2, "SIGALRM");
-#endif
-#ifdef SIGTERM
- lua_pushinteger(L, SIGTERM);
- lua_setfield(L, -2, "SIGTERM");
-#endif
-#ifdef SIGCHLD
- lua_pushinteger(L, SIGCHLD);
- lua_setfield(L, -2, "SIGCHLD");
-#endif
-#ifdef SIGSTKFLT
- lua_pushinteger(L, SIGSTKFLT);
- lua_setfield(L, -2, "SIGSTKFLT");
-#endif
-#ifdef SIGCONT
- lua_pushinteger(L, SIGCONT);
- lua_setfield(L, -2, "SIGCONT");
-#endif
-#ifdef SIGSTOP
- lua_pushinteger(L, SIGSTOP);
- lua_setfield(L, -2, "SIGSTOP");
-#endif
-#ifdef SIGTSTP
- lua_pushinteger(L, SIGTSTP);
- lua_setfield(L, -2, "SIGTSTP");
-#endif
-#ifdef SIGBREAK
- lua_pushinteger(L, SIGBREAK);
- lua_setfield(L, -2, "SIGBREAK");
-#endif
-#ifdef SIGTTIN
- lua_pushinteger(L, SIGTTIN);
- lua_setfield(L, -2, "SIGTTIN");
-#endif
-#ifdef SIGTTOU
- lua_pushinteger(L, SIGTTOU);
- lua_setfield(L, -2, "SIGTTOU");
-#endif
-#ifdef SIGURG
- lua_pushinteger(L, SIGURG);
- lua_setfield(L, -2, "SIGURG");
-#endif
-#ifdef SIGXCPU
- lua_pushinteger(L, SIGXCPU);
- lua_setfield(L, -2, "SIGXCPU");
-#endif
-#ifdef SIGXFSZ
- lua_pushinteger(L, SIGXFSZ);
- lua_setfield(L, -2, "SIGXFSZ");
-#endif
-#ifdef SIGVTALRM
- lua_pushinteger(L, SIGVTALRM);
- lua_setfield(L, -2, "SIGVTALRM");
-#endif
-#ifdef SIGPROF
- lua_pushinteger(L, SIGPROF);
- lua_setfield(L, -2, "SIGPROF");
-#endif
-#ifdef SIGWINCH
- lua_pushinteger(L, SIGWINCH);
- lua_setfield(L, -2, "SIGWINCH");
-#endif
-#ifdef SIGIO
- lua_pushinteger(L, SIGIO);
- lua_setfield(L, -2, "SIGIO");
-#endif
-#ifdef SIGPOLL
- lua_pushinteger(L, SIGPOLL);
- lua_setfield(L, -2, "SIGPOLL");
-#endif
-#ifdef SIGLOST
- lua_pushinteger(L, SIGLOST);
- lua_setfield(L, -2, "SIGLOST");
-#endif
-#ifdef SIGPWR
- lua_pushinteger(L, SIGPWR);
- lua_setfield(L, -2, "SIGPWR");
-#endif
-#ifdef SIGSYS
- lua_pushinteger(L, SIGSYS);
- lua_setfield(L, -2, "SIGSYS");
-#endif
- return 1;
-}
-
-static int luv_af_string_to_num(const char* string) {
- if (!string) return AF_UNSPEC;
-#ifdef AF_UNIX
- if (strcmp(string, "unix") == 0) return AF_UNIX;
-#endif
-#ifdef AF_INET
- if (strcmp(string, "inet") == 0) return AF_INET;
-#endif
-#ifdef AF_INET6
- if (strcmp(string, "inet6") == 0) return AF_INET6;
-#endif
-#ifdef AF_IPX
- if (strcmp(string, "ipx") == 0) return AF_IPX;
-#endif
-#ifdef AF_NETLINK
- if (strcmp(string, "netlink") == 0) return AF_NETLINK;
-#endif
-#ifdef AF_X25
- if (strcmp(string, "x25") == 0) return AF_X25;
-#endif
-#ifdef AF_AX25
- if (strcmp(string, "ax25") == 0) return AF_AX25;
-#endif
-#ifdef AF_ATMPVC
- if (strcmp(string, "atmpvc") == 0) return AF_ATMPVC;
-#endif
-#ifdef AF_APPLETALK
- if (strcmp(string, "appletalk") == 0) return AF_APPLETALK;
-#endif
-#ifdef AF_PACKET
- if (strcmp(string, "packet") == 0) return AF_PACKET;
-#endif
- return 0;
-}
-
-static const char* luv_af_num_to_string(const int num) {
- switch (num) {
-#ifdef AF_UNIX
- case AF_UNIX: return "unix";
-#endif
-#ifdef AF_INET
- case AF_INET: return "inet";
-#endif
-#ifdef AF_INET6
- case AF_INET6: return "inet6";
-#endif
-#ifdef AF_IPX
- case AF_IPX: return "ipx";
-#endif
-#ifdef AF_NETLINK
- case AF_NETLINK: return "netlink";
-#endif
-#ifdef AF_X25
- case AF_X25: return "x25";
-#endif
-#ifdef AF_AX25
- case AF_AX25: return "ax25";
-#endif
-#ifdef AF_ATMPVC
- case AF_ATMPVC: return "atmpvc";
-#endif
-#ifdef AF_APPLETALK
- case AF_APPLETALK: return "appletalk";
-#endif
-#ifdef AF_PACKET
- case AF_PACKET: return "packet";
-#endif
- }
- return NULL;
-}
-
-
-static int luv_sock_string_to_num(const char* string) {
- if (!string) return 0;
-#ifdef SOCK_STREAM
- if (strcmp(string, "stream") == 0) return SOCK_STREAM;
-#endif
-#ifdef SOCK_DGRAM
- if (strcmp(string, "dgram") == 0) return SOCK_DGRAM;
-#endif
-#ifdef SOCK_SEQPACKET
- if (strcmp(string, "seqpacket") == 0) return SOCK_SEQPACKET;
-#endif
-#ifdef SOCK_RAW
- if (strcmp(string, "raw") == 0) return SOCK_RAW;
-#endif
-#ifdef SOCK_RDM
- if (strcmp(string, "rdm") == 0) return SOCK_RDM;
-#endif
- return 0;
-}
-
-static const char* luv_sock_num_to_string(const int num) {
- switch (num) {
-#ifdef SOCK_STREAM
- case SOCK_STREAM: return "stream";
-#endif
-#ifdef SOCK_DGRAM
- case SOCK_DGRAM: return "dgram";
-#endif
-#ifdef SOCK_SEQPACKET
- case SOCK_SEQPACKET: return "seqpacket";
-#endif
-#ifdef SOCK_RAW
- case SOCK_RAW: return "raw";
-#endif
-#ifdef SOCK_RDM
- case SOCK_RDM: return "rdm";
-#endif
- }
- return NULL;
-}
-
-static int luv_sig_string_to_num(const char* string) {
- if (!string) return 0;
-#ifdef SIGHUP
- if (strcmp(string, "sighup") == 0) return SIGHUP;
-#endif
-#ifdef SIGINT
- if (strcmp(string, "sigint") == 0) return SIGINT;
-#endif
-#ifdef SIGQUIT
- if (strcmp(string, "sigquit") == 0) return SIGQUIT;
-#endif
-#ifdef SIGILL
- if (strcmp(string, "sigill") == 0) return SIGILL;
-#endif
-#ifdef SIGTRAP
- if (strcmp(string, "sigtrap") == 0) return SIGTRAP;
-#endif
-#ifdef SIGABRT
- if (strcmp(string, "sigabrt") == 0) return SIGABRT;
-#endif
-#ifdef SIGIOT
- if (strcmp(string, "sigiot") == 0) return SIGIOT;
-#endif
-#ifdef SIGBUS
- if (strcmp(string, "sigbus") == 0) return SIGBUS;
-#endif
-#ifdef SIGFPE
- if (strcmp(string, "sigfpe") == 0) return SIGFPE;
-#endif
-#ifdef SIGKILL
- if (strcmp(string, "sigkill") == 0) return SIGKILL;
-#endif
-#ifdef SIGUSR1
- if (strcmp(string, "sigusr1") == 0) return SIGUSR1;
-#endif
-#ifdef SIGSEGV
- if (strcmp(string, "sigsegv") == 0) return SIGSEGV;
-#endif
-#ifdef SIGUSR2
- if (strcmp(string, "sigusr2") == 0) return SIGUSR2;
-#endif
-#ifdef SIGPIPE
- if (strcmp(string, "sigpipe") == 0) return SIGPIPE;
-#endif
-#ifdef SIGALRM
- if (strcmp(string, "sigalrm") == 0) return SIGALRM;
-#endif
-#ifdef SIGTERM
- if (strcmp(string, "sigterm") == 0) return SIGTERM;
-#endif
-#ifdef SIGCHLD
- if (strcmp(string, "sigchld") == 0) return SIGCHLD;
-#endif
-#ifdef SIGSTKFLT
- if (strcmp(string, "sigstkflt") == 0) return SIGSTKFLT;
-#endif
-#ifdef SIGCONT
- if (strcmp(string, "sigcont") == 0) return SIGCONT;
-#endif
-#ifdef SIGSTOP
- if (strcmp(string, "sigstop") == 0) return SIGSTOP;
-#endif
-#ifdef SIGTSTP
- if (strcmp(string, "sigtstp") == 0) return SIGTSTP;
-#endif
-#ifdef SIGBREAK
- if (strcmp(string, "sigbreak") == 0) return SIGBREAK;
-#endif
-#ifdef SIGTTIN
- if (strcmp(string, "sigttin") == 0) return SIGTTIN;
-#endif
-#ifdef SIGTTOU
- if (strcmp(string, "sigttou") == 0) return SIGTTOU;
-#endif
-#ifdef SIGURG
- if (strcmp(string, "sigurg") == 0) return SIGURG;
-#endif
-#ifdef SIGXCPU
- if (strcmp(string, "sigxcpu") == 0) return SIGXCPU;
-#endif
-#ifdef SIGXFSZ
- if (strcmp(string, "sigxfsz") == 0) return SIGXFSZ;
-#endif
-#ifdef SIGVTALRM
- if (strcmp(string, "sigvtalrm") == 0) return SIGVTALRM;
-#endif
-#ifdef SIGPROF
- if (strcmp(string, "sigprof") == 0) return SIGPROF;
-#endif
-#ifdef SIGWINCH
- if (strcmp(string, "sigwinch") == 0) return SIGWINCH;
-#endif
-#ifdef SIGIO
- if (strcmp(string, "sigio") == 0) return SIGIO;
-#endif
-#ifdef SIGPOLL
- if (strcmp(string, "sigpoll") == 0) return SIGPOLL;
-#endif
-#ifdef SIGLOST
- if (strcmp(string, "siglost") == 0) return SIGLOST;
-#endif
-#ifdef SIGPWR
- if (strcmp(string, "sigpwr") == 0) return SIGPWR;
-#endif
-#ifdef SIGSYS
- if (strcmp(string, "sigsys") == 0) return SIGSYS;
-#endif
- return 0;
-}
-
-static const char* luv_sig_num_to_string(const int num) {
- switch (num) {
-#ifdef SIGHUP
- case SIGHUP: return "sighup";
-#endif
-#ifdef SIGINT
- case SIGINT: return "sigint";
-#endif
-#ifdef SIGQUIT
- case SIGQUIT: return "sigquit";
-#endif
-#ifdef SIGILL
- case SIGILL: return "sigill";
-#endif
-#ifdef SIGTRAP
- case SIGTRAP: return "sigtrap";
-#endif
-#ifdef SIGABRT
- case SIGABRT: return "sigabrt";
-#endif
-#ifdef SIGIOT
-# if SIGIOT != SIGABRT
- case SIGIOT: return "sigiot";
-# endif
-#endif
-#ifdef SIGBUS
- case SIGBUS: return "sigbus";
-#endif
-#ifdef SIGFPE
- case SIGFPE: return "sigfpe";
-#endif
-#ifdef SIGKILL
- case SIGKILL: return "sigkill";
-#endif
-#ifdef SIGUSR1
- case SIGUSR1: return "sigusr1";
-#endif
-#ifdef SIGSEGV
- case SIGSEGV: return "sigsegv";
-#endif
-#ifdef SIGUSR2
- case SIGUSR2: return "sigusr2";
-#endif
-#ifdef SIGPIPE
- case SIGPIPE: return "sigpipe";
-#endif
-#ifdef SIGALRM
- case SIGALRM: return "sigalrm";
-#endif
-#ifdef SIGTERM
- case SIGTERM: return "sigterm";
-#endif
-#ifdef SIGCHLD
- case SIGCHLD: return "sigchld";
-#endif
-#ifdef SIGSTKFLT
- case SIGSTKFLT: return "sigstkflt";
-#endif
-#ifdef SIGCONT
- case SIGCONT: return "sigcont";
-#endif
-#ifdef SIGSTOP
- case SIGSTOP: return "sigstop";
-#endif
-#ifdef SIGTSTP
- case SIGTSTP: return "sigtstp";
-#endif
-#ifdef SIGBREAK
- case SIGBREAK: return "sigbreak";
-#endif
-#ifdef SIGTTIN
- case SIGTTIN: return "sigttin";
-#endif
-#ifdef SIGTTOU
- case SIGTTOU: return "sigttou";
-#endif
-#ifdef SIGURG
- case SIGURG: return "sigurg";
-#endif
-#ifdef SIGXCPU
- case SIGXCPU: return "sigxcpu";
-#endif
-#ifdef SIGXFSZ
- case SIGXFSZ: return "sigxfsz";
-#endif
-#ifdef SIGVTALRM
- case SIGVTALRM: return "sigvtalrm";
-#endif
-#ifdef SIGPROF
- case SIGPROF: return "sigprof";
-#endif
-#ifdef SIGWINCH
- case SIGWINCH: return "sigwinch";
-#endif
-#ifdef SIGIO
- case SIGIO: return "sigio";
-#endif
-#ifdef SIGPOLL
-# if SIGPOLL != SIGIO
- case SIGPOLL: return "sigpoll";
-# endif
-#endif
-#ifdef SIGLOST
- case SIGLOST: return "siglost";
-#endif
-#ifdef SIGPWR
-# if SIGPWR != SIGLOST
- case SIGPWR: return "sigpwr";
-# endif
-#endif
-#ifdef SIGSYS
- case SIGSYS: return "sigsys";
-#endif
- }
- return NULL;
-}
diff --git a/3rdparty/luv/src/dns.c b/3rdparty/luv/src/dns.c
deleted file mode 100644
index f3446f30985..00000000000
--- a/3rdparty/luv/src/dns.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "luv.h"
-#ifndef WIN32
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#endif
-
-static void luv_pushaddrinfo(lua_State* L, struct addrinfo* res) {
- char ip[INET6_ADDRSTRLEN];
- int port, i = 0;
- const char *addr;
- struct addrinfo* curr = res;
- lua_newtable(L);
- for (curr = res; curr; curr = curr->ai_next) {
- if (curr->ai_family == AF_INET || curr->ai_family == AF_INET6) {
- lua_newtable(L);
- if (curr->ai_family == AF_INET) {
- addr = (char*) &((struct sockaddr_in*) curr->ai_addr)->sin_addr;
- port = ((struct sockaddr_in*) curr->ai_addr)->sin_port;
- } else {
- addr = (char*) &((struct sockaddr_in6*) curr->ai_addr)->sin6_addr;
- port = ((struct sockaddr_in6*) curr->ai_addr)->sin6_port;
- }
- lua_pushstring(L, luv_af_num_to_string(curr->ai_family));
- lua_setfield(L, -2, "family");
- uv_inet_ntop(curr->ai_family, addr, ip, INET6_ADDRSTRLEN);
- lua_pushstring(L, ip);
- lua_setfield(L, -2, "addr");
- if (ntohs(port)) {
- lua_pushinteger(L, ntohs(port));
- lua_setfield(L, -2, "port");
- }
- lua_pushstring(L, luv_sock_num_to_string(curr->ai_socktype));
- lua_setfield(L, -2, "socktype");
- lua_pushstring(L, luv_af_num_to_string(curr->ai_protocol));
- lua_setfield(L, -2, "protocol");
- if (curr->ai_canonname) {
- lua_pushstring(L, curr->ai_canonname);
- lua_setfield(L, -2, "canonname");
- }
- lua_rawseti(L, -2, ++i);
- }
- }
-}
-
-static void luv_getaddrinfo_cb(uv_getaddrinfo_t* req, int status, struct addrinfo* res) {
- lua_State* L = luv_state(req->loop);
- int nargs;
-
- if (status < 0) {
- luv_status(L, status);
- nargs = 1;
- }
- else {
- lua_pushnil(L);
- luv_pushaddrinfo(L, res);
- nargs = 2;
- }
- luv_fulfill_req(L, req->data, nargs);
- luv_cleanup_req(L, req->data);
- req->data = NULL;
- if (res) uv_freeaddrinfo(res);
-}
-
-
-static int luv_getaddrinfo(lua_State* L) {
- uv_getaddrinfo_t* req;
- const char* node;
- const char* service;
- struct addrinfo hints_s;
- struct addrinfo* hints = &hints_s;
- int ret, ref;
- if (lua_isnoneornil(L, 1)) node = NULL;
- else node = luaL_checkstring(L, 1);
- if (lua_isnoneornil(L, 2)) service = NULL;
- else service = luaL_checkstring(L, 2);
- if (!lua_isnoneornil(L, 3)) luaL_checktype(L, 3, LUA_TTABLE);
- else hints = NULL;
- ref = lua_isnoneornil(L, 4) ? LUA_NOREF : luv_check_continuation(L, 4);
- if (hints) {
- // Initialize the hints
- memset(hints, 0, sizeof(*hints));
-
- // Process the `family` hint.
- lua_getfield(L, 3, "family");
- if (lua_isnumber(L, -1)) {
- hints->ai_family = lua_tointeger(L, -1);
- }
- else if (lua_isstring(L, -1)) {
- hints->ai_family = luv_af_string_to_num(lua_tostring(L, -1));
- }
- else if (lua_isnil(L, -1)) {
- hints->ai_family = AF_UNSPEC;
- }
- else {
- luaL_argerror(L, 3, "family hint must be string if set");
- }
- lua_pop(L, 1);
-
- // Process `socktype` hint
- lua_getfield(L, 3, "socktype");
- if (lua_isnumber(L, -1)) {
- hints->ai_socktype = lua_tointeger(L, -1);
- }
- else if (lua_isstring(L, -1)) {
- hints->ai_socktype = luv_sock_string_to_num(lua_tostring(L, -1));
- }
- else if (!lua_isnil(L, -1)) {
- return luaL_argerror(L, 3, "socktype hint must be string if set");
- }
- lua_pop(L, 1);
-
- // Process the `protocol` hint
- lua_getfield(L, 3, "protocol");
- if (lua_isnumber(L, -1)) {
- hints->ai_protocol = lua_tointeger(L, -1);
- }
- else if (lua_isstring(L, -1)) {
- int protocol = luv_af_string_to_num(lua_tostring(L, -1));
- if (protocol) {
- hints->ai_protocol = protocol;
- }
- else {
- return luaL_argerror(L, 3, "Invalid protocol hint");
- }
- }
- else if (!lua_isnil(L, -1)) {
- return luaL_argerror(L, 3, "protocol hint must be string if set");
- }
- lua_pop(L, 1);
-
- lua_getfield(L, 3, "addrconfig");
- if (lua_toboolean(L, -1)) hints->ai_flags |= AI_ADDRCONFIG;
- lua_pop(L, 1);
-
- lua_getfield(L, 3, "v4mapped");
- if (lua_toboolean(L, -1)) hints->ai_flags |= AI_V4MAPPED;
- lua_pop(L, 1);
-
- lua_getfield(L, 3, "all");
- if (lua_toboolean(L, -1)) hints->ai_flags |= AI_ALL;
- lua_pop(L, 1);
-
- lua_getfield(L, 3, "numerichost");
- if (lua_toboolean(L, -1)) hints->ai_flags |= AI_NUMERICHOST;
- lua_pop(L, 1);
-
- lua_getfield(L, 3, "passive");
- if (lua_toboolean(L, -1)) hints->ai_flags |= AI_PASSIVE;
- lua_pop(L, 1);
-
- lua_getfield(L, 3, "numericserv");
- if (lua_toboolean(L, -1)) {
- hints->ai_flags |= AI_NUMERICSERV;
- /* On OS X upto at least OSX 10.9, getaddrinfo crashes
- * if AI_NUMERICSERV is set and the servname is NULL or "0".
- * This workaround avoids a segfault in libsystem.
- */
- if (NULL == service) service = "00";
- }
- lua_pop(L, 1);
-
- lua_getfield(L, 3, "canonname");
- if (lua_toboolean(L, -1)) hints->ai_flags |= AI_CANONNAME;
- lua_pop(L, 1);
- }
-
- req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
-
- ret = uv_getaddrinfo(luv_loop(L), req, ref == LUA_NOREF ? NULL : luv_getaddrinfo_cb, node, service, hints);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- if (ref == LUA_NOREF) {
-
- lua_pop(L, 1);
- luv_pushaddrinfo(L, req->addrinfo);
- uv_freeaddrinfo(req->addrinfo);
- luv_cleanup_req(L, req->data);
- }
- return 1;
-}
-
-static void luv_getnameinfo_cb(uv_getnameinfo_t* req, int status, const char* hostname, const char* service) {
- lua_State* L = luv_state(req->loop);
-
- int nargs;
-
- if (status < 0) {
- luv_status(L, status);
- nargs = 1;
- }
- else {
- lua_pushnil(L);
- lua_pushstring(L, hostname);
- lua_pushstring(L, service);
- nargs = 3;
- }
-
- luv_fulfill_req(L, req->data, nargs);
- luv_cleanup_req(L, req->data);
- req->data = NULL;
-}
-
-static int luv_getnameinfo(lua_State* L) {
- uv_getnameinfo_t* req;
- struct sockaddr_storage addr;
- const char* ip = NULL;
- int flags = 0;
- int ret, ref, port = 0;
-
- luaL_checktype(L, 1, LUA_TTABLE);
- memset(&addr, 0, sizeof(addr));
-
- lua_getfield(L, 1, "ip");
- if (lua_isstring(L, -1)) {
- ip = lua_tostring(L, -1);
- }
- else if (!lua_isnil(L, -1)) {
- luaL_argerror(L, 1, "ip property must be string if set");
- }
- lua_pop(L, 1);
-
- lua_getfield(L, 1, "port");
- if (lua_isnumber(L, -1)) {
- port = lua_tointeger(L, -1);
- }
- else if (!lua_isnil(L, -1)) {
- luaL_argerror(L, 1, "port property must be integer if set");
- }
- lua_pop(L, 1);
-
- if (ip || port) {
- if (!ip) ip = "0.0.0.0";
- if (!uv_ip4_addr(ip, port, (struct sockaddr_in*)&addr)) {
- addr.ss_family = AF_INET;
- }
- else if (!uv_ip6_addr(ip, port, (struct sockaddr_in6*)&addr)) {
- addr.ss_family = AF_INET6;
- }
- else {
- return luaL_argerror(L, 1, "Invalid ip address or port");
- }
- }
-
- lua_getfield(L, 1, "family");
- if (lua_isnumber(L, -1)) {
- addr.ss_family = lua_tointeger(L, -1);
- }
- else if (lua_isstring(L, -1)) {
- addr.ss_family = luv_af_string_to_num(lua_tostring(L, -1));
- }
- else if (!lua_isnil(L, -1)) {
- luaL_argerror(L, 1, "family must be string if set");
- }
- lua_pop(L, 1);
-
- ref = lua_isnoneornil(L, 2) ? LUA_NOREF : luv_check_continuation(L, 2);
-
- req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
-
- ret = uv_getnameinfo(luv_loop(L), req, ref == LUA_NOREF ? NULL : luv_getnameinfo_cb, (struct sockaddr*)&addr, flags);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- if (ref == LUA_NOREF) {
- lua_pop(L, 1);
- lua_pushstring(L, req->host);
- lua_pushstring(L, req->service);
- luv_cleanup_req(L, req->data);
- return 2;
- }
- return 1;
-}
-
diff --git a/3rdparty/luv/src/fs.c b/3rdparty/luv/src/fs.c
deleted file mode 100644
index bacf11ea647..00000000000
--- a/3rdparty/luv/src/fs.c
+++ /dev/null
@@ -1,614 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "luv.h"
-
-static uv_fs_t* luv_check_fs(lua_State* L, int index) {
- uv_fs_t* req = luaL_checkudata(L, index, "uv_req");
- luaL_argcheck(L, req->type = UV_FS && req->data, index, "Expected uv_fs_t");
- return req;
-}
-
-static void luv_push_timespec_table(lua_State* L, const uv_timespec_t* t) {
- lua_createtable(L, 0, 2);
- lua_pushinteger(L, t->tv_sec);
- lua_setfield(L, -2, "sec");
- lua_pushinteger(L, t->tv_nsec);
- lua_setfield(L, -2, "nsec");
-}
-
-static void luv_push_stats_table(lua_State* L, const uv_stat_t* s) {
- const char* type = NULL;
- lua_createtable(L, 0, 23);
- lua_pushinteger(L, s->st_dev);
- lua_setfield(L, -2, "dev");
- lua_pushinteger(L, s->st_mode);
- lua_setfield(L, -2, "mode");
- lua_pushinteger(L, s->st_nlink);
- lua_setfield(L, -2, "nlink");
- lua_pushinteger(L, s->st_uid);
- lua_setfield(L, -2, "uid");
- lua_pushinteger(L, s->st_gid);
- lua_setfield(L, -2, "gid");
- lua_pushinteger(L, s->st_rdev);
- lua_setfield(L, -2, "rdev");
- lua_pushinteger(L, s->st_ino);
- lua_setfield(L, -2, "ino");
- lua_pushinteger(L, s->st_size);
- lua_setfield(L, -2, "size");
- lua_pushinteger(L, s->st_blksize);
- lua_setfield(L, -2, "blksize");
- lua_pushinteger(L, s->st_blocks);
- lua_setfield(L, -2, "blocks");
- lua_pushinteger(L, s->st_flags);
- lua_setfield(L, -2, "flags");
- lua_pushinteger(L, s->st_gen);
- lua_setfield(L, -2, "gen");
- luv_push_timespec_table(L, &s->st_atim);
- lua_setfield(L, -2, "atime");
- luv_push_timespec_table(L, &s->st_mtim);
- lua_setfield(L, -2, "mtime");
- luv_push_timespec_table(L, &s->st_ctim);
- lua_setfield(L, -2, "ctime");
- luv_push_timespec_table(L, &s->st_birthtim);
- lua_setfield(L, -2, "birthtime");
- if (S_ISREG(s->st_mode)) {
- type = "file";
- }
- else if (S_ISDIR(s->st_mode)) {
- type = "directory";
- }
- else if (S_ISLNK(s->st_mode)) {
- type = "link";
- }
- else if (S_ISFIFO(s->st_mode)) {
- type = "fifo";
- }
-#ifdef S_ISSOCK
- else if (S_ISSOCK(s->st_mode)) {
- type = "socket";
- }
-#endif
- else if (S_ISCHR(s->st_mode)) {
- type = "char";
- }
- else if (S_ISBLK(s->st_mode)) {
- type = "block";
- }
- if (type) {
- lua_pushstring(L, type);
- lua_setfield(L, -2, "type");
- }
-}
-
-static int luv_check_flags(lua_State* L, int index) {
- const char* string;
- if (lua_isnumber(L, index)) {
- return lua_tointeger(L, index);
- }
- else if (!lua_isstring(L, index)) {
- return luaL_argerror(L, index, "Expected string or integer for file open mode");
- }
- string = lua_tostring(L, index);
-
- if (strcmp(string, "r") == 0) return O_RDONLY;
-#ifdef O_SYNC
- if (strcmp(string, "rs") == 0 ||
- strcmp(string, "sr") == 0) return O_RDONLY | O_SYNC;
-#endif
- if (strcmp(string, "r+") == 0) return O_RDWR;
-#ifdef O_SYNC
- if (strcmp(string, "rs+") == 0 ||
- strcmp(string, "sr+") == 0) return O_RDWR | O_SYNC;
-#endif
- if (strcmp(string, "w") == 0) return O_TRUNC | O_CREAT | O_WRONLY;
- if (strcmp(string, "wx") == 0 ||
- strcmp(string, "xw") == 0) return O_TRUNC | O_CREAT | O_WRONLY | O_EXCL;
- if (strcmp(string, "w+") == 0) return O_TRUNC | O_CREAT | O_RDWR;
- if (strcmp(string, "wx+") == 0 ||
- strcmp(string, "xw+") == 0) return O_TRUNC | O_CREAT | O_RDWR | O_EXCL;
- if (strcmp(string, "a") == 0) return O_APPEND | O_CREAT | O_WRONLY;
- if (strcmp(string, "ax") == 0 ||
- strcmp(string, "xa") == 0) return O_APPEND | O_CREAT | O_WRONLY | O_EXCL;
- if (strcmp(string, "a+") == 0) return O_APPEND | O_CREAT | O_RDWR;
- if (strcmp(string, "ax+") == 0 ||
- strcmp(string, "xa+") == 0) return O_APPEND | O_CREAT | O_RDWR | O_EXCL;
-
- return luaL_error(L, "Unknown file open flag '%s'", string);
-}
-
-static int luv_check_amode(lua_State* L, int index) {
- size_t i;
- int mode;
- const char* string;
- if (lua_isnumber(L, index)) {
- return lua_tointeger(L, index);
- }
- else if (!lua_isstring(L, index)) {
- return luaL_argerror(L, index, "Expected string or integer for file access mode check");
- }
- string = lua_tostring(L, index);
- mode = 0;
- for (i = 0; i < strlen(string); ++i) {
- switch (string[i]) {
- case 'r': case 'R':
- mode |= R_OK;
- break;
- case 'w': case 'W':
- mode |= W_OK;
- break;
- case 'x': case 'X':
- mode |= X_OK;
- break;
- default:
- return luaL_argerror(L, index, "Unknown character in access mode string");
- }
- }
- return mode;
-}
-
-/* Processes a result and pushes the data onto the stack
- returns the number of items pushed */
-static int push_fs_result(lua_State* L, uv_fs_t* req) {
- luv_req_t* data = req->data;
-
- if (req->fs_type == UV_FS_ACCESS) {
- lua_pushboolean(L, req->result >= 0);
- return 1;
- }
-
- if (req->result < 0) {
- lua_pushnil(L);
- if (req->path) {
- lua_pushfstring(L, "%s: %s: %s", uv_err_name(req->result), uv_strerror(req->result), req->path);
- }
- else {
- lua_pushfstring(L, "%s: %s", uv_err_name(req->result), uv_strerror(req->result));
- }
- return 2;
- }
-
- switch (req->fs_type) {
- case UV_FS_CLOSE:
- case UV_FS_RENAME:
- case UV_FS_UNLINK:
- case UV_FS_RMDIR:
- case UV_FS_MKDIR:
- case UV_FS_FTRUNCATE:
- case UV_FS_FSYNC:
- case UV_FS_FDATASYNC:
- case UV_FS_LINK:
- case UV_FS_SYMLINK:
- case UV_FS_CHMOD:
- case UV_FS_FCHMOD:
- case UV_FS_CHOWN:
- case UV_FS_FCHOWN:
- case UV_FS_UTIME:
- case UV_FS_FUTIME:
- lua_pushboolean(L, 1);
- return 1;
-
- case UV_FS_OPEN:
- case UV_FS_SENDFILE:
- case UV_FS_WRITE:
- lua_pushinteger(L, req->result);
- return 1;
-
- case UV_FS_STAT:
- case UV_FS_LSTAT:
- case UV_FS_FSTAT:
- luv_push_stats_table(L, &req->statbuf);
- return 1;
-
- case UV_FS_MKDTEMP:
- lua_pushstring(L, req->path);
- return 1;
-
- case UV_FS_READLINK:
- case UV_FS_REALPATH:
- lua_pushstring(L, (char*)req->ptr);
- return 1;
-
- case UV_FS_READ:
- lua_pushlstring(L, data->data, req->result);
- return 1;
-
- case UV_FS_SCANDIR:
- // Expose the userdata for the request.
- lua_rawgeti(L, LUA_REGISTRYINDEX, data->req_ref);
- return 1;
-
- default:
- lua_pushnil(L);
- lua_pushfstring(L, "UNKNOWN FS TYPE %d\n", req->fs_type);
- return 2;
- }
-
-}
-
-static void luv_fs_cb(uv_fs_t* req) {
- lua_State* L = luv_state(req->loop);
-
- int nargs = push_fs_result(L, req);
- if (nargs == 2 && lua_isnil(L, -nargs)) {
- // If it was an error, convert to (err, value) format.
- lua_remove(L, -nargs);
- nargs--;
- }
- else {
- // Otherwise insert a nil in front to convert to (err, value) format.
- lua_pushnil(L);
- lua_insert(L, -nargs - 1);
- nargs++;
- }
- luv_fulfill_req(L, req->data, nargs);
- if (req->fs_type != UV_FS_SCANDIR) {
- luv_cleanup_req(L, req->data);
- req->data = NULL;
- uv_fs_req_cleanup(req);
- }
-}
-
-#define FS_CALL(func, req, ...) { \
- int ret, sync; \
- luv_req_t* data = req->data; \
- sync = data->callback_ref == LUA_NOREF; \
- ret = uv_fs_##func(luv_loop(L), req, __VA_ARGS__, \
- sync ? NULL : luv_fs_cb); \
- if (req->fs_type != UV_FS_ACCESS && ret < 0) { \
- lua_pushnil(L); \
- if (req->path) { \
- lua_pushfstring(L, "%s: %s: %s", uv_err_name(req->result), uv_strerror(req->result), req->path); \
- } \
- else { \
- lua_pushfstring(L, "%s: %s", uv_err_name(req->result), uv_strerror(req->result)); \
- } \
- lua_pushstring(L, uv_err_name(req->result)); \
- luv_cleanup_req(L, req->data); \
- req->data = NULL; \
- uv_fs_req_cleanup(req); \
- return 3; \
- } \
- if (sync) { \
- int nargs = push_fs_result(L, req); \
- if (req->fs_type != UV_FS_SCANDIR) { \
- luv_cleanup_req(L, req->data); \
- req->data = NULL; \
- uv_fs_req_cleanup(req); \
- } \
- return nargs; \
- } \
- lua_rawgeti(L, LUA_REGISTRYINDEX, data->req_ref); \
- return 1; \
-}
-
-static int luv_fs_close(lua_State* L) {
- uv_file file = luaL_checkinteger(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(close, req, file);
-}
-
-static int luv_fs_open(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- int flags = luv_check_flags(L, 2);
- int mode = luaL_checkinteger(L, 3);
- int ref = luv_check_continuation(L, 4);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(open, req, path, flags, mode);
-}
-
-static int luv_fs_read(lua_State* L) {
- uv_file file = luaL_checkinteger(L, 1);
- int64_t len = luaL_checkinteger(L, 2);
- int64_t offset = luaL_checkinteger(L, 3);
- uv_buf_t buf;
- int ref;
- uv_fs_t* req;
- char* data = malloc(len);
- if (!data) return luaL_error(L, "Failure to allocate buffer");
- buf = uv_buf_init(data, len);
- ref = luv_check_continuation(L, 4);
- req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- // TODO: find out why we can't just use req->ptr for the base
- ((luv_req_t*)req->data)->data = buf.base;
- FS_CALL(read, req, file, &buf, 1, offset);
-}
-
-static int luv_fs_unlink(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(unlink, req, path);
-}
-
-static int luv_fs_write(lua_State* L) {
- uv_file file = luaL_checkinteger(L, 1);
- uv_buf_t buf;
- int64_t offset;
- int ref;
- uv_fs_t* req;
- size_t count;
- uv_buf_t *bufs = NULL;
-
- if (lua_istable(L, 2)) {
- bufs = luv_prep_bufs(L, 2, &count);
- buf.base = NULL;
- }
- else if (lua_isstring(L, 2)) {
- luv_check_buf(L, 2, &buf);
- count = 1;
- }
- else {
- return luaL_argerror(L, 2, "data must be string or table of strings");
- }
-
- offset = luaL_checkinteger(L, 3);
- ref = luv_check_continuation(L, 4);
- req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- req->ptr = buf.base;
- ((luv_req_t*)req->data)->data = bufs;
- FS_CALL(write, req, file, bufs ? bufs : &buf, count, offset);
-}
-
-static int luv_fs_mkdir(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- int mode = luaL_checkinteger(L, 2);
- int ref = luv_check_continuation(L, 3);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(mkdir, req, path, mode);
-}
-
-static int luv_fs_mkdtemp(lua_State* L) {
- const char* tpl = luaL_checkstring(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(mkdtemp, req, tpl);
-}
-
-static int luv_fs_rmdir(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(rmdir, req, path);
-}
-
-static int luv_fs_scandir(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- int flags = 0; // TODO: find out what these flags are.
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(scandir, req, path, flags);
-}
-
-static int luv_fs_scandir_next(lua_State* L) {
- uv_fs_t* req = luv_check_fs(L, 1);
- uv_dirent_t ent;
- int ret = uv_fs_scandir_next(req, &ent);
- const char* type;
- if (ret == UV_EOF) {
- luv_cleanup_req(L, req->data);
- req->data = NULL;
- uv_fs_req_cleanup(req);
- return 0;
- }
- if (ret < 0) return luv_error(L, ret);
- lua_pushstring(L, ent.name);
- switch (ent.type) {
- case UV_DIRENT_UNKNOWN: return 1;
- case UV_DIRENT_FILE: type = "file"; break;
- case UV_DIRENT_DIR: type = "directory"; break;
- case UV_DIRENT_LINK: type = "link"; break;
- case UV_DIRENT_FIFO: type = "fifo"; break;
- case UV_DIRENT_SOCKET: type = "socket"; break;
- case UV_DIRENT_CHAR: type = "char"; break;
- case UV_DIRENT_BLOCK: type = "block"; break;
- default: assert(0);
- }
- lua_pushstring(L, type);
- return 2;
-}
-
-static int luv_fs_stat(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(stat, req, path);
-}
-
-static int luv_fs_fstat(lua_State* L) {
- uv_file file = luaL_checkinteger(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(fstat, req, file);
-}
-
-static int luv_fs_lstat(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(lstat, req, path);
-}
-
-static int luv_fs_rename(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- const char* new_path = luaL_checkstring(L, 2);
- int ref = luv_check_continuation(L, 3);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(rename, req, path, new_path);
-}
-
-static int luv_fs_fsync(lua_State* L) {
- uv_file file = luaL_checkinteger(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(fsync, req, file);
-}
-
-static int luv_fs_fdatasync(lua_State* L) {
- uv_file file = luaL_checkinteger(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(fdatasync, req, file);
-}
-
-static int luv_fs_ftruncate(lua_State* L) {
- uv_file file = luaL_checkinteger(L, 1);
- int64_t offset = luaL_checkinteger(L, 2);
- int ref = luv_check_continuation(L, 3);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(ftruncate, req, file, offset);
-}
-
-static int luv_fs_sendfile(lua_State* L) {
- uv_file out_fd = luaL_checkinteger(L, 1);
- uv_file in_fd = luaL_checkinteger(L, 2);
- int64_t in_offset = luaL_checkinteger(L, 3);
- size_t length = luaL_checkinteger(L, 4);
- int ref = luv_check_continuation(L, 5);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(sendfile, req, out_fd, in_fd, in_offset, length);
-}
-
-static int luv_fs_access(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- int amode = luv_check_amode(L, 2);
- int ref = luv_check_continuation(L, 3);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(access, req, path, amode);
-}
-
-static int luv_fs_chmod(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- int mode = luaL_checkinteger(L, 2);
- int ref = luv_check_continuation(L, 3);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(chmod, req, path, mode);
-}
-
-static int luv_fs_fchmod(lua_State* L) {
- uv_file file = luaL_checkinteger(L, 1);
- int mode = luaL_checkinteger(L, 2);
- int ref = luv_check_continuation(L, 3);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(fchmod, req, file, mode);
-}
-
-static int luv_fs_utime(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- double atime = luaL_checknumber(L, 2);
- double mtime = luaL_checknumber(L, 3);
- int ref = luv_check_continuation(L, 4);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(utime, req, path, atime, mtime);
-}
-
-static int luv_fs_futime(lua_State* L) {
- uv_file file = luaL_checkinteger(L, 1);
- double atime = luaL_checknumber(L, 2);
- double mtime = luaL_checknumber(L, 3);
- int ref = luv_check_continuation(L, 4);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(futime, req, file, atime, mtime);
-}
-
-static int luv_fs_link(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- const char* new_path = luaL_checkstring(L, 2);
- int ref = luv_check_continuation(L, 3);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(link, req, path, new_path);
-}
-
-static int luv_fs_symlink(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- const char* new_path = luaL_checkstring(L, 2);
- int flags = 0, ref;
- uv_fs_t* req;
- if (lua_type(L, 3) == LUA_TTABLE) {
- lua_getfield(L, 3, "dir");
- if (lua_toboolean(L, -1)) flags |= UV_FS_SYMLINK_DIR;
- lua_pop(L, 1);
- lua_getfield(L, 3, "junction");
- if (lua_toboolean(L, -1)) flags |= UV_FS_SYMLINK_JUNCTION;
- lua_pop(L, 1);
- }
- ref = luv_check_continuation(L, 4);
- req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
-
- FS_CALL(symlink, req, path, new_path, flags);
-}
-
-static int luv_fs_readlink(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(readlink, req, path);
-}
-
-static int luv_fs_realpath(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(realpath, req, path);
-}
-
-static int luv_fs_chown(lua_State* L) {
- const char* path = luaL_checkstring(L, 1);
- uv_uid_t uid = luaL_checkinteger(L, 2);
- uv_uid_t gid = luaL_checkinteger(L, 3);
- int ref = luv_check_continuation(L, 4);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(chown, req, path, uid, gid);
-}
-
-static int luv_fs_fchown(lua_State* L) {
- uv_file file = luaL_checkinteger(L, 1);
- uv_uid_t uid = luaL_checkinteger(L, 2);
- uv_uid_t gid = luaL_checkinteger(L, 3);
- int ref = luv_check_continuation(L, 4);
- uv_fs_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- FS_CALL(fchown, req, file, uid, gid);
-}
diff --git a/3rdparty/luv/src/fs_event.c b/3rdparty/luv/src/fs_event.c
deleted file mode 100644
index 52bda788421..00000000000
--- a/3rdparty/luv/src/fs_event.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "luv.h"
-
-static uv_fs_event_t* luv_check_fs_event(lua_State* L, int index) {
- uv_fs_event_t* handle = luv_checkudata(L, index, "uv_fs_event");
- luaL_argcheck(L, handle->type == UV_FS_EVENT && handle->data, index, "Expected uv_fs_event_t");
- return handle;
-}
-
-static int luv_new_fs_event(lua_State* L) {
- uv_fs_event_t* handle = luv_newuserdata(L, sizeof(*handle));
- int ret = uv_fs_event_init(luv_loop(L), handle);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static void luv_fs_event_cb(uv_fs_event_t* handle, const char* filename, int events, int status) {
- lua_State* L = luv_state(handle->loop);
-
- // err
- luv_status(L, status);
-
- // filename
- lua_pushstring(L, filename);
-
- // events
- lua_newtable(L);
- if (events & UV_RENAME) {
- lua_pushboolean(L, 1);
- lua_setfield(L, -2, "rename");
- }
- if (events & UV_CHANGE) {
- lua_pushboolean(L, 1);
- lua_setfield(L, -2, "change");
- }
-
- luv_call_callback(L, handle->data, LUV_FS_EVENT, 3);
-}
-
-static int luv_fs_event_start(lua_State* L) {
- uv_fs_event_t* handle = luv_check_fs_event(L, 1);
- const char* path = luaL_checkstring(L, 2);
- int flags = 0, ret;
- luaL_checktype(L, 3, LUA_TTABLE);
- lua_getfield(L, 3, "watch_entry");
- if (lua_toboolean(L, -1)) flags |= UV_FS_EVENT_WATCH_ENTRY;
- lua_pop(L, 1);
- lua_getfield(L, 3, "stat");
- if (lua_toboolean(L, -1)) flags |= UV_FS_EVENT_STAT;
- lua_pop(L, 1);
- lua_getfield(L, 3, "recursive");
- if (lua_toboolean(L, -1)) flags |= UV_FS_EVENT_RECURSIVE;
- lua_pop(L, 1);
- luv_check_callback(L, handle->data, LUV_FS_EVENT, 4);
- ret = uv_fs_event_start(handle, luv_fs_event_cb, path, flags);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_fs_event_stop(lua_State* L) {
- uv_fs_event_t* handle = luv_check_fs_event(L, 1);
- int ret = uv_fs_event_stop(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_fs_event_getpath(lua_State* L) {
- uv_fs_event_t* handle = luv_check_fs_event(L, 1);
- size_t len = 2*PATH_MAX;
- char buf[2*PATH_MAX];
- int ret = uv_fs_event_getpath(handle, buf, &len);
- if (ret < 0) return luv_error(L, ret);
- lua_pushlstring(L, buf, len);
- return 1;
-}
diff --git a/3rdparty/luv/src/fs_poll.c b/3rdparty/luv/src/fs_poll.c
deleted file mode 100644
index 7ead32f322c..00000000000
--- a/3rdparty/luv/src/fs_poll.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "luv.h"
-
-static uv_fs_poll_t* luv_check_fs_poll(lua_State* L, int index) {
- uv_fs_poll_t* handle = luv_checkudata(L, index, "uv_fs_poll");
- luaL_argcheck(L, handle->type == UV_FS_POLL && handle->data, index, "Expected uv_fs_poll_t");
- return handle;
-}
-
-static int luv_new_fs_poll(lua_State* L) {
- uv_fs_poll_t* handle = luv_newuserdata(L, sizeof(*handle));
- int ret = uv_fs_poll_init(luv_loop(L), handle);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static void luv_fs_poll_cb(uv_fs_poll_t* handle, int status, const uv_stat_t* prev, const uv_stat_t* curr) {
- lua_State* L = luv_state(handle->loop);
-
- // err
- luv_status(L, status);
-
- // prev
- if (prev) {
- luv_push_stats_table(L, prev);
- }
- else {
- lua_pushnil(L);
- }
-
- // curr
- if (curr) {
- luv_push_stats_table(L, curr);
- }
- else {
- lua_pushnil(L);
- }
-
- luv_call_callback(L, handle->data, LUV_FS_POLL, 3);
-}
-
-static int luv_fs_poll_start(lua_State* L) {
- uv_fs_poll_t* handle = luv_check_fs_poll(L, 1);
- const char* path = luaL_checkstring(L, 2);
- unsigned int interval = luaL_checkinteger(L, 3);
- int ret;
- luv_check_callback(L, handle->data, LUV_FS_POLL, 4);
- ret = uv_fs_poll_start(handle, luv_fs_poll_cb, path, interval);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_fs_poll_stop(lua_State* L) {
- uv_fs_poll_t* handle = luv_check_fs_poll(L, 1);
- int ret = uv_fs_poll_stop(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_fs_poll_getpath(lua_State* L) {
- uv_fs_poll_t* handle = luv_check_fs_poll(L, 1);
- size_t len = 2*PATH_MAX;
- char buf[2*PATH_MAX];
- int ret = uv_fs_poll_getpath(handle, buf, &len);
- if (ret < 0) return luv_error(L, ret);
- lua_pushlstring(L, buf, len);
- return 1;
-}
diff --git a/3rdparty/luv/src/handle.c b/3rdparty/luv/src/handle.c
deleted file mode 100644
index 3efd2982641..00000000000
--- a/3rdparty/luv/src/handle.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static void* luv_newuserdata(lua_State* L, size_t sz) {
- void* handle = malloc(sz);
- if (handle) {
- *(void**)lua_newuserdata(L, sizeof(void*)) = handle;
- }
- return handle;
-}
-
-static void* luv_checkudata(lua_State* L, int ud, const char* tname) {
- return *(void**) luaL_checkudata(L, ud, tname);
-}
-
-static uv_handle_t* luv_check_handle(lua_State* L, int index) {
- int isHandle;
- uv_handle_t* handle;
- if (!(handle = *(void**)lua_touserdata(L, index))) { goto fail; }
- lua_getfield(L, LUA_REGISTRYINDEX, "uv_handle");
- lua_getmetatable(L, index < 0 ? index - 1 : index);
- lua_rawget(L, -2);
- isHandle = lua_toboolean(L, -1);
- lua_pop(L, 2);
- if (isHandle) { return handle; }
- fail: luaL_argerror(L, index, "Expected uv_handle userdata");
- return NULL;
-}
-
-// Show the libuv type instead of generic "userdata"
-static int luv_handle_tostring(lua_State* L) {
- uv_handle_t* handle = luv_check_handle(L, 1);
- switch (handle->type) {
-#define XX(uc, lc) case UV_##uc: lua_pushfstring(L, "uv_"#lc"_t: %p", handle); break;
- UV_HANDLE_TYPE_MAP(XX)
-#undef XX
- default: lua_pushfstring(L, "uv_handle_t: %p", handle); break;
- }
- return 1;
-}
-
-static int luv_is_active(lua_State* L) {
- uv_handle_t* handle = luv_check_handle(L, 1);
- int ret = uv_is_active(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushboolean(L, ret);
- return 1;
-}
-
-static int luv_is_closing(lua_State* L) {
- uv_handle_t* handle = luv_check_handle(L, 1);
- int ret = uv_is_closing(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushboolean(L, ret);
- return 1;
-}
-
-static void luv_close_cb(uv_handle_t* handle) {
- lua_State* L = luv_state(handle->loop);
- luv_handle_t* data = handle->data;
- if (!data) return;
- luv_call_callback(L, data, LUV_CLOSED, 0);
- luv_cleanup_handle(L, data);
- handle->data = NULL;
-}
-
-static int luv_close(lua_State* L) {
- uv_handle_t* handle = luv_check_handle(L, 1);
- if (uv_is_closing(handle)) {
- luaL_error(L, "handle %p is already closing", handle);
- }
- if (!lua_isnoneornil(L, 2)) {
- luv_check_callback(L, handle->data, LUV_CLOSED, 2);
- }
- uv_close(handle, luv_close_cb);
- return 0;
-}
-
-static void luv_gc_cb(uv_handle_t* handle) {
- luv_close_cb(handle);
- free(handle);
-}
-
-static int luv_handle_gc(lua_State* L) {
- void** udata = lua_touserdata(L, 1);
- uv_handle_t* handle = *udata;
- if (handle != NULL) {
- if (!uv_is_closing(handle))
- uv_close(handle, luv_gc_cb);
- else
- free(*udata);
-
- *udata = NULL;
- }
-
- return 0;
-}
-
-static int luv_ref(lua_State* L) {
- uv_handle_t* handle = luv_check_handle(L, 1);
- uv_ref(handle);
- return 0;
-}
-
-static int luv_unref(lua_State* L) {
- uv_handle_t* handle = luv_check_handle(L, 1);
- uv_unref(handle);
- return 0;
-}
-
-static int luv_has_ref(lua_State* L) {
- uv_handle_t* handle = luv_check_handle(L, 1);
- int ret = uv_has_ref(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushboolean(L, ret);
- return 1;
-}
-
-static int luv_send_buffer_size(lua_State* L) {
- uv_handle_t* handle = luv_check_handle(L, 1);
- int value;
- int ret;
- if (lua_isnoneornil(L, 2)) {
- value = 0;
- }
- else {
- value = luaL_checkinteger(L, 2);
- }
- ret = uv_send_buffer_size(handle, &value);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_recv_buffer_size(lua_State* L) {
- uv_handle_t* handle = luv_check_handle(L, 1);
- int value;
- int ret;
- if (lua_isnoneornil(L, 2)) {
- value = 0;
- }
- else {
- value = luaL_checkinteger(L, 2);
- }
- ret = uv_recv_buffer_size(handle, &value);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_fileno(lua_State* L) {
- uv_handle_t* handle = luv_check_handle(L, 1);
- uv_os_fd_t fd;
- int ret = uv_fileno(handle, &fd);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, (LUA_INTEGER)(ptrdiff_t)fd);
- return 1;
-}
diff --git a/3rdparty/luv/src/idle.c b/3rdparty/luv/src/idle.c
deleted file mode 100644
index 132cbe43c33..00000000000
--- a/3rdparty/luv/src/idle.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static uv_idle_t* luv_check_idle(lua_State* L, int index) {
- uv_idle_t* handle = luv_checkudata(L, index, "uv_idle");
- luaL_argcheck(L, handle->type == UV_IDLE && handle->data, index, "Expected uv_idle_t");
- return handle;
-}
-
-static int luv_new_idle(lua_State* L) {
- uv_idle_t* handle = luv_newuserdata(L, sizeof(*handle));
- int ret = uv_idle_init(luv_loop(L), handle);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static void luv_idle_cb(uv_idle_t* handle) {
- lua_State* L = luv_state(handle->loop);
- luv_handle_t* data = handle->data;
- luv_call_callback(L, data, LUV_IDLE, 0);
-}
-
-static int luv_idle_start(lua_State* L) {
- uv_idle_t* handle = luv_check_idle(L, 1);
- int ret;
- luv_check_callback(L, handle->data, LUV_IDLE, 2);
- ret = uv_idle_start(handle, luv_idle_cb);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_idle_stop(lua_State* L) {
- uv_idle_t* handle = luv_check_idle(L, 1);
- int ret = uv_idle_stop(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
diff --git a/3rdparty/luv/src/lhandle.c b/3rdparty/luv/src/lhandle.c
deleted file mode 100644
index c8cf294504e..00000000000
--- a/3rdparty/luv/src/lhandle.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "lhandle.h"
-
-static luv_handle_t* luv_setup_handle(lua_State* L) {
- luv_handle_t* data;
- const uv_handle_t* handle = *(void**)lua_touserdata(L, -1);
- luaL_checktype(L, -1, LUA_TUSERDATA);
-
- data = malloc(sizeof(*data));
- if (!data) luaL_error(L, "Can't allocate luv handle");
-
- #define XX(uc, lc) case UV_##uc: \
- luaL_getmetatable(L, "uv_"#lc); \
- break;
- switch (handle->type) {
- UV_HANDLE_TYPE_MAP(XX)
- default:
- luaL_error(L, "Unknown handle type");
- return NULL;
- }
- #undef XX
-
- lua_setmetatable(L, -2);
-
- lua_pushvalue(L, -1);
-
- data->ref = luaL_ref(L, LUA_REGISTRYINDEX);
- data->callbacks[0] = LUA_NOREF;
- data->callbacks[1] = LUA_NOREF;
- data->extra = NULL;
- return data;
-}
-
-static void luv_check_callback(lua_State* L, luv_handle_t* data, luv_callback_id id, int index) {
- luaL_checktype(L, index, LUA_TFUNCTION);
- luaL_unref(L, LUA_REGISTRYINDEX, data->callbacks[id]);
- lua_pushvalue(L, index);
- data->callbacks[id] = luaL_ref(L, LUA_REGISTRYINDEX);
-}
-
-static int traceback (lua_State *L) {
- if (!lua_isstring(L, 1)) /* 'message' not a string? */
- return 1; /* keep it intact */
- lua_pushglobaltable(L);
- lua_getfield(L, -1, "debug");
- lua_remove(L, -2);
- if (!lua_istable(L, -1)) {
- lua_pop(L, 1);
- return 1;
- }
- lua_getfield(L, -1, "traceback");
- if (!lua_isfunction(L, -1)) {
- lua_pop(L, 2);
- return 1;
- }
- lua_pushvalue(L, 1); /* pass error message */
- lua_pushinteger(L, 2); /* skip this function and traceback */
- lua_call(L, 2, 1); /* call debug.traceback */
- return 1;
-}
-
-static void luv_call_callback(lua_State* L, luv_handle_t* data, luv_callback_id id, int nargs) {
- int ref = data->callbacks[id];
- if (ref == LUA_NOREF) {
- lua_pop(L, nargs);
- }
- else {
- // Get the traceback function in case of error
- lua_pushcfunction(L, traceback);
- // And insert it before the args if there are any.
- if (nargs) {
- lua_insert(L, -1 - nargs);
- }
- // Get the callback
- lua_rawgeti(L, LUA_REGISTRYINDEX, ref);
- // And insert it before the args if there are any.
- if (nargs) {
- lua_insert(L, -1 - nargs);
- }
-
- if (lua_pcall(L, nargs, 0, -2 - nargs)) {
- fprintf(stderr, "Uncaught Error: %s\n", lua_tostring(L, -1));
- exit(-1);
- }
- // Remove the traceback function
- lua_pop(L, 1);
- }
-}
-
-static void luv_cleanup_handle(lua_State* L, luv_handle_t* data) {
- luaL_unref(L, LUA_REGISTRYINDEX, data->ref);
- luaL_unref(L, LUA_REGISTRYINDEX, data->callbacks[0]);
- luaL_unref(L, LUA_REGISTRYINDEX, data->callbacks[1]);
- if (data->extra)
- free(data->extra);
- free(data);
-}
-
-static void luv_find_handle(lua_State* L, luv_handle_t* data) {
- lua_rawgeti(L, LUA_REGISTRYINDEX, data->ref);
-}
diff --git a/3rdparty/luv/src/lhandle.h b/3rdparty/luv/src/lhandle.h
deleted file mode 100644
index f6c0733719b..00000000000
--- a/3rdparty/luv/src/lhandle.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#ifndef LUV_LHANDLE_H
-#define LUV_LHANDLE_H
-
-#include "luv.h"
-
-/* There are two slots for holding callbacks. One is for the CLOSED event.
- The other slot is for all others since they never conflict in practice.
-*/
-#define luv_callback_id int
-#define LUV_CLOSED 0
-#define LUV_TIMEOUT 1
-#define LUV_PREPARE 1
-#define LUV_IDLE 1
-#define LUV_CHECK 1
-#define LUV_ASYNC 1
-#define LUV_POLL 1
-#define LUV_SIGNAL 1
-#define LUV_EXIT 1
-#define LUV_CONNECTION 1
-#define LUV_READ 1
-#define LUV_RECV 1
-#define LUV_FS_EVENT 1
-#define LUV_FS_POLL 1
-
-/* Ref for userdata and event callbacks */
-typedef struct {
- int ref;
- int callbacks[2];
- void* extra;
-} luv_handle_t;
-
-/* Setup the handle at the top of the stack */
-static luv_handle_t* luv_setup_handle(lua_State* L);
-
-/* Store a lua callback in a luv_handle for future callbacks.
- Either replace an existing callback by id or append a new one at the end.
-*/
-static void luv_check_callback(lua_State* L, luv_handle_t* data, luv_callback_id id, int index);
-
-/* Lookup a function and call it with nargs
- If there is no such function, pop the args.
-*/
-static void luv_call_callback(lua_State* L, luv_handle_t* data, luv_callback_id id, int nargs);
-
-/* Push a userdata on the stack from a handle */
-static void luv_find_handle(lua_State* L, luv_handle_t* data);
-
-/* Recursivly free the luv_handle and all event handlers */
-static void luv_cleanup_handle(lua_State* L, luv_handle_t* data);
-
-#endif
diff --git a/3rdparty/luv/src/loop.c b/3rdparty/luv/src/loop.c
deleted file mode 100644
index 33c49d3f64c..00000000000
--- a/3rdparty/luv/src/loop.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static int luv_loop_close(lua_State* L) {
- int ret = uv_loop_close(luv_loop(L));
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-// These are the same order as uv_run_mode which also starts at 0
-static const char *const luv_runmodes[] = {
- "default", "once", "nowait", NULL
-};
-
-static int luv_run(lua_State* L) {
- int mode = luaL_checkoption(L, 1, "default", luv_runmodes);
- int ret = uv_run(luv_loop(L), mode);
- if (ret < 0) return luv_error(L, ret);
- lua_pushboolean(L, ret);
- return 1;
-}
-
-static int luv_loop_alive(lua_State* L) {
- int ret = uv_loop_alive(luv_loop(L));
- if (ret < 0) return luv_error(L, ret);
- lua_pushboolean(L, ret);
- return 1;
-}
-
-static int luv_stop(lua_State* L) {
- uv_stop(luv_loop(L));
- return 0;
-}
-
-static int luv_backend_fd(lua_State* L) {
- int ret = uv_backend_fd(luv_loop(L));
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_backend_timeout(lua_State* L) {
- int ret = uv_backend_timeout(luv_loop(L));
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_now(lua_State* L) {
- uint64_t now = uv_now(luv_loop(L));
- lua_pushinteger(L, now);
- return 1;
-}
-
-static int luv_update_time(lua_State* L) {
- uv_update_time(luv_loop(L));
- return 0;
-}
-
-static void luv_walk_cb(uv_handle_t* handle, void* arg) {
- lua_State* L = arg;
- luv_handle_t* data = handle->data;
-
- // Sanity check
- // Most invalid values are large and refs are small, 0x1000000 is arbitrary.
- assert(data && data->ref < 0x1000000);
-
- lua_pushvalue(L, 1); // Copy the function
- luv_find_handle(L, data); // Get the userdata
- lua_call(L, 1, 0); // Call the function
-}
-
-static int luv_walk(lua_State* L) {
- luaL_checktype(L, 1, LUA_TFUNCTION);
- uv_walk(luv_loop(L), luv_walk_cb, L);
- return 0;
-}
diff --git a/3rdparty/luv/src/lreq.c b/3rdparty/luv/src/lreq.c
deleted file mode 100644
index 38ed6a77eb0..00000000000
--- a/3rdparty/luv/src/lreq.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "lreq.h"
-
-
-static int luv_check_continuation(lua_State* L, int index) {
- if (lua_isnoneornil(L, index)) return LUA_NOREF;
- luaL_checktype(L, index, LUA_TFUNCTION);
- lua_pushvalue(L, index);
- return luaL_ref(L, LUA_REGISTRYINDEX);
-}
-
-// Store a lua callback in a luv_req for the continuation.
-// The uv_req_t is assumed to be at the top of the stack
-static luv_req_t* luv_setup_req(lua_State* L, int callback_ref) {
- luv_req_t* data;
-
- luaL_checktype(L, -1, LUA_TUSERDATA);
-
- data = malloc(sizeof(*data));
- if (!data) luaL_error(L, "Problem allocating luv request");
-
- luaL_getmetatable(L, "uv_req");
- lua_setmetatable(L, -2);
-
- lua_pushvalue(L, -1);
- data->req_ref = luaL_ref(L, LUA_REGISTRYINDEX);
- data->callback_ref = callback_ref;
- data->data_ref = LUA_NOREF;
- data->data = NULL;
-
- return data;
-}
-
-
-static void luv_fulfill_req(lua_State* L, luv_req_t* data, int nargs) {
- if (data->callback_ref == LUA_NOREF) {
- lua_pop(L, nargs);
- }
- else {
- // Get the callback
- lua_rawgeti(L, LUA_REGISTRYINDEX, data->callback_ref);
- // And insert it before the args if there are any.
- if (nargs) {
- lua_insert(L, -1 - nargs);
- }
- lua_call(L, nargs, 0);
- }
-}
-
-static void luv_cleanup_req(lua_State* L, luv_req_t* data) {
- luaL_unref(L, LUA_REGISTRYINDEX, data->req_ref);
- luaL_unref(L, LUA_REGISTRYINDEX, data->callback_ref);
- luaL_unref(L, LUA_REGISTRYINDEX, data->data_ref);
- free(data->data);
- free(data);
-}
diff --git a/3rdparty/luv/src/lreq.h b/3rdparty/luv/src/lreq.h
deleted file mode 100644
index a8b147e057b..00000000000
--- a/3rdparty/luv/src/lreq.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#ifndef LUV_LREQ_H
-#define LUV_LREQ_H
-
-#include "luv.h"
-
-typedef struct {
- int req_ref; /* ref for uv_req_t's userdata */
- int callback_ref; /* ref for callback */
- int data_ref; /* ref for write data */
- void* data; /* extra data */
-} luv_req_t;
-
-/* Used in the top of a setup function to check the arg
- and ref the callback to an integer.
-*/
-static int luv_check_continuation(lua_State* L, int index);
-
-/* setup a luv_req_t. The userdata is assumed to be at the
- top of the stack.
-*/
-static luv_req_t* luv_setup_req(lua_State* L, int ref);
-
-static void luv_fulfill_req(lua_State* L, luv_req_t* data, int nargs);
-
-static void luv_cleanup_req(lua_State* L, luv_req_t* data);
-
-#endif
diff --git a/3rdparty/luv/src/lthreadpool.h b/3rdparty/luv/src/lthreadpool.h
deleted file mode 100644
index 0994746bc52..00000000000
--- a/3rdparty/luv/src/lthreadpool.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-* Copyright 2014 The Luvit Authors. All Rights Reserved.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
-#ifndef LUV_LTHREADPOOL_H
-#define LUV_LTHREADPOOL_H
-
-#include "luv.h"
-
-#define LUV_THREAD_MAXNUM_ARG 9
-
-typedef struct {
- /* only support LUA_TNIL, LUA_TBOOLEAN, LUA_TLIGHTUSERDATA, LUA_TNUMBER, LUA_TSTRING*/
- int type;
- union
- {
- lua_Number num;
- int boolean;
- void* userdata;
- struct {
- const char* base;
- size_t len;
- } str;
- } val;
-} luv_val_t;
-
-typedef struct {
- int argc;
- luv_val_t argv[LUV_THREAD_MAXNUM_ARG];
-} luv_thread_arg_t;
-
-static int luv_thread_arg_set(lua_State* L, luv_thread_arg_t* args, int idx, int top, int flag);
-static int luv_thread_arg_push(lua_State* L, const luv_thread_arg_t* args);
-static void luv_thread_arg_clear(luv_thread_arg_t* args);
-
-#endif //LUV_LTHREADPOOL_H
diff --git a/3rdparty/luv/src/luv.c b/3rdparty/luv/src/luv.c
deleted file mode 100644
index 7b552d68d53..00000000000
--- a/3rdparty/luv/src/luv.c
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "luv.h"
-#include "util.c"
-#include "lhandle.c"
-#include "lreq.c"
-#include "loop.c"
-#include "req.c"
-#include "handle.c"
-#include "timer.c"
-#include "prepare.c"
-#include "check.c"
-#include "idle.c"
-#include "async.c"
-#include "poll.c"
-#include "signal.c"
-#include "process.c"
-#include "stream.c"
-#include "tcp.c"
-#include "pipe.c"
-#include "tty.c"
-#include "udp.c"
-#include "fs_event.c"
-#include "fs_poll.c"
-#include "fs.c"
-#include "dns.c"
-#include "thread.c"
-#include "work.c"
-#include "misc.c"
-#include "constants.c"
-
-static const luaL_Reg luv_functions[] = {
- // loop.c
- {"loop_close", luv_loop_close},
- {"run", luv_run},
- {"loop_alive", luv_loop_alive},
- {"stop", luv_stop},
- {"backend_fd", luv_backend_fd},
- {"backend_timeout", luv_backend_timeout},
- {"now", luv_now},
- {"update_time", luv_update_time},
- {"walk", luv_walk},
-
- // req.c
- {"cancel", luv_cancel},
-
- // handle.c
- {"is_active", luv_is_active},
- {"is_closing", luv_is_closing},
- {"close", luv_close},
- {"ref", luv_ref},
- {"unref", luv_unref},
- {"has_ref", luv_has_ref},
- {"send_buffer_size", luv_send_buffer_size},
- {"recv_buffer_size", luv_recv_buffer_size},
- {"fileno", luv_fileno},
-
- // timer.c
- {"new_timer", luv_new_timer},
- {"timer_start", luv_timer_start},
- {"timer_stop", luv_timer_stop},
- {"timer_again", luv_timer_again},
- {"timer_set_repeat", luv_timer_set_repeat},
- {"timer_get_repeat", luv_timer_get_repeat},
-
- // prepare.c
- {"new_prepare", luv_new_prepare},
- {"prepare_start", luv_prepare_start},
- {"prepare_stop", luv_prepare_stop},
-
- // check.c
- {"new_check", luv_new_check},
- {"check_start", luv_check_start},
- {"check_stop", luv_check_stop},
-
- // idle.c
- {"new_idle", luv_new_idle},
- {"idle_start", luv_idle_start},
- {"idle_stop", luv_idle_stop},
-
- // async.c
- {"new_async", luv_new_async},
- {"async_send", luv_async_send},
-
- // poll.c
- {"new_poll", luv_new_poll},
- {"new_socket_poll", luv_new_socket_poll},
- {"poll_start", luv_poll_start},
- {"poll_stop", luv_poll_stop},
-
- // signal.c
- {"new_signal", luv_new_signal},
- {"signal_start", luv_signal_start},
- {"signal_stop", luv_signal_stop},
-
- // process.c
- {"disable_stdio_inheritance", luv_disable_stdio_inheritance},
- {"spawn", luv_spawn},
- {"process_kill", luv_process_kill},
- {"kill", luv_kill},
-
- // stream.c
- {"shutdown", luv_shutdown},
- {"listen", luv_listen},
- {"accept", luv_accept},
- {"read_start", luv_read_start},
- {"read_stop", luv_read_stop},
- {"write", luv_write},
- {"write2", luv_write2},
- {"try_write", luv_try_write},
- {"is_readable", luv_is_readable},
- {"is_writable", luv_is_writable},
- {"stream_set_blocking", luv_stream_set_blocking},
-
- // tcp.c
- {"new_tcp", luv_new_tcp},
- {"tcp_open", luv_tcp_open},
- {"tcp_nodelay", luv_tcp_nodelay},
- {"tcp_keepalive", luv_tcp_keepalive},
- {"tcp_simultaneous_accepts", luv_tcp_simultaneous_accepts},
- {"tcp_bind", luv_tcp_bind},
- {"tcp_getpeername", luv_tcp_getpeername},
- {"tcp_getsockname", luv_tcp_getsockname},
- {"tcp_connect", luv_tcp_connect},
- {"tcp_write_queue_size", luv_write_queue_size},
-
- // pipe.c
- {"new_pipe", luv_new_pipe},
- {"pipe_open", luv_pipe_open},
- {"pipe_bind", luv_pipe_bind},
- {"pipe_connect", luv_pipe_connect},
- {"pipe_getsockname", luv_pipe_getsockname},
- {"pipe_getpeername", luv_pipe_getpeername},
- {"pipe_pending_instances", luv_pipe_pending_instances},
- {"pipe_pending_count", luv_pipe_pending_count},
- {"pipe_pending_type", luv_pipe_pending_type},
-
- // tty.c
- {"new_tty", luv_new_tty},
- {"tty_set_mode", luv_tty_set_mode},
- {"tty_reset_mode", luv_tty_reset_mode},
- {"tty_get_winsize", luv_tty_get_winsize},
-
- // udp.c
- {"new_udp", luv_new_udp},
- {"udp_open", luv_udp_open},
- {"udp_bind", luv_udp_bind},
- {"udp_getsockname", luv_udp_getsockname},
- {"udp_set_membership", luv_udp_set_membership},
- {"udp_set_multicast_loop", luv_udp_set_multicast_loop},
- {"udp_set_multicast_ttl", luv_udp_set_multicast_ttl},
- {"udp_set_multicast_interface", luv_udp_set_multicast_interface},
- {"udp_set_broadcast", luv_udp_set_broadcast},
- {"udp_set_ttl", luv_udp_set_ttl},
- {"udp_send", luv_udp_send},
- {"udp_try_send", luv_udp_try_send},
- {"udp_recv_start", luv_udp_recv_start},
- {"udp_recv_stop", luv_udp_recv_stop},
-
- // fs_event.c
- {"new_fs_event", luv_new_fs_event},
- {"fs_event_start", luv_fs_event_start},
- {"fs_event_stop", luv_fs_event_stop},
- {"fs_event_getpath", luv_fs_event_getpath},
-
- // fs_poll.c
- {"new_fs_poll", luv_new_fs_poll},
- {"fs_poll_start", luv_fs_poll_start},
- {"fs_poll_stop", luv_fs_poll_stop},
- {"fs_poll_getpath", luv_fs_poll_getpath},
-
- // fs.c
- {"fs_close", luv_fs_close},
- {"fs_open", luv_fs_open},
- {"fs_read", luv_fs_read},
- {"fs_unlink", luv_fs_unlink},
- {"fs_write", luv_fs_write},
- {"fs_mkdir", luv_fs_mkdir},
- {"fs_mkdtemp", luv_fs_mkdtemp},
- {"fs_rmdir", luv_fs_rmdir},
- {"fs_scandir", luv_fs_scandir},
- {"fs_scandir_next", luv_fs_scandir_next},
- {"fs_stat", luv_fs_stat},
- {"fs_fstat", luv_fs_fstat},
- {"fs_lstat", luv_fs_lstat},
- {"fs_rename", luv_fs_rename},
- {"fs_fsync", luv_fs_fsync},
- {"fs_fdatasync", luv_fs_fdatasync},
- {"fs_ftruncate", luv_fs_ftruncate},
- {"fs_sendfile", luv_fs_sendfile},
- {"fs_access", luv_fs_access},
- {"fs_chmod", luv_fs_chmod},
- {"fs_fchmod", luv_fs_fchmod},
- {"fs_utime", luv_fs_utime},
- {"fs_futime", luv_fs_futime},
- {"fs_link", luv_fs_link},
- {"fs_symlink", luv_fs_symlink},
- {"fs_readlink", luv_fs_readlink},
- {"fs_realpath", luv_fs_realpath},
- {"fs_chown", luv_fs_chown},
- {"fs_fchown", luv_fs_fchown},
-
- // dns.c
- {"getaddrinfo", luv_getaddrinfo},
- {"getnameinfo", luv_getnameinfo},
-
- // misc.c
- {"chdir", luv_chdir},
- {"os_homedir", luv_os_homedir},
- {"cpu_info", luv_cpu_info},
- {"cwd", luv_cwd},
- {"exepath", luv_exepath},
- {"get_process_title", luv_get_process_title},
- {"get_total_memory", luv_get_total_memory},
- {"get_free_memory", luv_get_free_memory},
- {"getpid", luv_getpid},
-#ifndef _WIN32
- {"getuid", luv_getuid},
- {"setuid", luv_setuid},
- {"getgid", luv_getgid},
- {"setgid", luv_setgid},
-#endif
- {"getrusage", luv_getrusage},
- {"guess_handle", luv_guess_handle},
- {"hrtime", luv_hrtime},
- {"interface_addresses", luv_interface_addresses},
- {"loadavg", luv_loadavg},
- {"resident_set_memory", luv_resident_set_memory},
- {"set_process_title", luv_set_process_title},
- {"uptime", luv_uptime},
- {"version", luv_version},
- {"version_string", luv_version_string},
-
- // thread.c
- {"new_thread", luv_new_thread},
- {"thread_equal", luv_thread_equal},
- {"thread_self", luv_thread_self},
- {"thread_join", luv_thread_join},
- {"sleep", luv_thread_sleep},
-
- // work.c
- {"new_work", luv_new_work},
- {"queue_work", luv_queue_work},
-
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_handle_methods[] = {
- // handle.c
- {"is_active", luv_is_active},
- {"is_closing", luv_is_closing},
- {"close", luv_close},
- {"ref", luv_ref},
- {"unref", luv_unref},
- {"has_ref", luv_has_ref},
- {"send_buffer_size", luv_send_buffer_size},
- {"recv_buffer_size", luv_recv_buffer_size},
- {"fileno", luv_fileno},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_async_methods[] = {
- {"send", luv_async_send},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_check_methods[] = {
- {"start", luv_check_start},
- {"stop", luv_check_stop},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_fs_event_methods[] = {
- {"start", luv_fs_event_start},
- {"stop", luv_fs_event_stop},
- {"getpath", luv_fs_event_getpath},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_fs_poll_methods[] = {
- {"start", luv_fs_poll_start},
- {"stop", luv_fs_poll_stop},
- {"getpath", luv_fs_poll_getpath},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_idle_methods[] = {
- {"start", luv_idle_start},
- {"stop", luv_idle_stop},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_stream_methods[] = {
- {"shutdown", luv_shutdown},
- {"listen", luv_listen},
- {"accept", luv_accept},
- {"read_start", luv_read_start},
- {"read_stop", luv_read_stop},
- {"write", luv_write},
- {"write2", luv_write2},
- {"try_write", luv_try_write},
- {"is_readable", luv_is_readable},
- {"is_writable", luv_is_writable},
- {"set_blocking", luv_stream_set_blocking},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_pipe_methods[] = {
- {"open", luv_pipe_open},
- {"bind", luv_pipe_bind},
- {"connect", luv_pipe_connect},
- {"getsockname", luv_pipe_getsockname},
- {"getpeername", luv_pipe_getpeername},
- {"pending_instances", luv_pipe_pending_instances},
- {"pending_count", luv_pipe_pending_count},
- {"pending_type", luv_pipe_pending_type},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_poll_methods[] = {
- {"start", luv_poll_start},
- {"stop", luv_poll_stop},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_prepare_methods[] = {
- {"start", luv_prepare_start},
- {"stop", luv_prepare_stop},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_process_methods[] = {
- {"kill", luv_process_kill},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_tcp_methods[] = {
- {"open", luv_tcp_open},
- {"nodelay", luv_tcp_nodelay},
- {"keepalive", luv_tcp_keepalive},
- {"simultaneous_accepts", luv_tcp_simultaneous_accepts},
- {"bind", luv_tcp_bind},
- {"getpeername", luv_tcp_getpeername},
- {"getsockname", luv_tcp_getsockname},
- {"connect", luv_tcp_connect},
- {"write_queue_size", luv_write_queue_size},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_timer_methods[] = {
- {"start", luv_timer_start},
- {"stop", luv_timer_stop},
- {"again", luv_timer_again},
- {"set_repeat", luv_timer_set_repeat},
- {"get_repeat", luv_timer_get_repeat},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_tty_methods[] = {
- {"set_mode", luv_tty_set_mode},
- {"get_winsize", luv_tty_get_winsize},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_udp_methods[] = {
- {"open", luv_udp_open},
- {"bind", luv_udp_bind},
- {"bindgetsockname", luv_udp_getsockname},
- {"set_membership", luv_udp_set_membership},
- {"set_multicast_loop", luv_udp_set_multicast_loop},
- {"set_multicast_ttl", luv_udp_set_multicast_ttl},
- {"set_multicast_interface", luv_udp_set_multicast_interface},
- {"set_broadcast", luv_udp_set_broadcast},
- {"set_ttl", luv_udp_set_ttl},
- {"send", luv_udp_send},
- {"try_send", luv_udp_try_send},
- {"recv_start", luv_udp_recv_start},
- {"recv_stop", luv_udp_recv_stop},
- {NULL, NULL}
-};
-
-static const luaL_Reg luv_signal_methods[] = {
- {"start", luv_signal_start},
- {"stop", luv_signal_stop},
- {NULL, NULL}
-};
-
-static void luv_handle_init(lua_State* L) {
-
- lua_newtable(L);
-#define XX(uc, lc) \
- luaL_newmetatable (L, "uv_"#lc); \
- lua_pushcfunction(L, luv_handle_tostring); \
- lua_setfield(L, -2, "__tostring"); \
- lua_pushcfunction(L, luv_handle_gc); \
- lua_setfield(L, -2, "__gc"); \
- luaL_newlib(L, luv_##lc##_methods); \
- luaL_setfuncs(L, luv_handle_methods, 0); \
- lua_setfield(L, -2, "__index"); \
- lua_pushboolean(L, 1); \
- lua_rawset(L, -3);
-
- UV_HANDLE_TYPE_MAP(XX)
-#undef XX
- lua_setfield(L, LUA_REGISTRYINDEX, "uv_handle");
-
- lua_newtable(L);
-
- luaL_getmetatable(L, "uv_pipe");
- lua_getfield(L, -1, "__index");
- luaL_setfuncs(L, luv_stream_methods, 0);
- lua_pop(L, 1);
- lua_pushboolean(L, 1);
- lua_rawset(L, -3);
-
- luaL_getmetatable(L, "uv_tcp");
- lua_getfield(L, -1, "__index");
- luaL_setfuncs(L, luv_stream_methods, 0);
- lua_pop(L, 1);
- lua_pushboolean(L, 1);
- lua_rawset(L, -3);
-
- luaL_getmetatable(L, "uv_tty");
- lua_getfield(L, -1, "__index");
- luaL_setfuncs(L, luv_stream_methods, 0);
- lua_pop(L, 1);
- lua_pushboolean(L, 1);
- lua_rawset(L, -3);
-
- lua_setfield(L, LUA_REGISTRYINDEX, "uv_stream");
-}
-
-LUALIB_API lua_State* luv_state(uv_loop_t* loop) {
- return loop->data;
-}
-
-// TODO: find out if storing this somehow in an upvalue is faster
-LUALIB_API uv_loop_t* luv_loop(lua_State* L) {
- uv_loop_t* loop;
- lua_pushstring(L, "uv_loop");
- lua_rawget(L, LUA_REGISTRYINDEX);
- loop = lua_touserdata(L, -1);
- lua_pop(L, 1);
- return loop;
-}
-
-static void walk_cb(uv_handle_t *handle, void *arg)
-{
- (void)arg;
- if (!uv_is_closing(handle)) {
- uv_close(handle, luv_close_cb);
- }
-}
-
-static int loop_gc(lua_State *L) {
- uv_loop_t* loop = luv_loop(L);
- // Call uv_close on every active handle
- uv_walk(loop, walk_cb, NULL);
- // Run the event loop until all handles are successfully closed
- while (uv_loop_close(loop)) {
- uv_run(loop, UV_RUN_DEFAULT);
- }
- return 0;
-}
-
-LUALIB_API int luaopen_luv (lua_State *L) {
-
- uv_loop_t* loop;
- int ret;
-
- // Setup the uv_loop meta table for a proper __gc
- luaL_newmetatable(L, "uv_loop.meta");
- lua_pushstring(L, "__gc");
- lua_pushcfunction(L, loop_gc);
- lua_settable(L, -3);
-
- loop = lua_newuserdata(L, sizeof(*loop));
- ret = uv_loop_init(loop);
- if (ret < 0) {
- return luaL_error(L, "%s: %s\n", uv_err_name(ret), uv_strerror(ret));
- }
- // setup the metatable for __gc
- luaL_getmetatable(L, "uv_loop.meta");
- lua_setmetatable(L, -2);
- // Tell the state how to find the loop.
- lua_pushstring(L, "uv_loop");
- lua_insert(L, -2);
- lua_rawset(L, LUA_REGISTRYINDEX);
- lua_pop(L, 1);
-
- // Tell the loop how to find the state.
- loop->data = L;
-
- luv_req_init(L);
- luv_handle_init(L);
- luv_thread_init(L);
- luv_work_init(L);
-
- luaL_newlib(L, luv_functions);
- luv_constants(L);
- lua_setfield(L, -2, "constants");
-
- return 1;
-}
diff --git a/3rdparty/luv/src/luv.h b/3rdparty/luv/src/luv.h
deleted file mode 100644
index 681384da363..00000000000
--- a/3rdparty/luv/src/luv.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#ifndef LUV_H
-#define LUV_H
-#include <lua.h>
-#include <lualib.h>
-#include <lauxlib.h>
-#include "uv.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#if defined(_WIN32)
-# include <fcntl.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# ifndef __MINGW32__
-# define S_ISREG(x) (((x) & _S_IFMT) == _S_IFREG)
-# define S_ISDIR(x) (((x) & _S_IFMT) == _S_IFDIR)
-# define S_ISFIFO(x) (((x) & _S_IFMT) == _S_IFIFO)
-# define S_ISCHR(x) (((x) & _S_IFMT) == _S_IFCHR)
-# define S_ISBLK(x) 0
-# endif
-# define S_ISLNK(x) (((x) & S_IFLNK) == S_IFLNK)
-# define S_ISSOCK(x) 0
-#else
-# include <unistd.h>
-#endif
-
-#ifndef PATH_MAX
-#define PATH_MAX (8096)
-#endif
-
-#ifndef MAX_TITLE_LENGTH
-#define MAX_TITLE_LENGTH (8192)
-#endif
-
-#if LUA_VERSION_NUM < 502
-# define lua_rawlen lua_objlen
-/* lua_...uservalue: Something very different, but it should get the job done */
-# define lua_getuservalue lua_getfenv
-# define lua_setuservalue lua_setfenv
-# define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l))
-# define luaL_setfuncs(L,l,n) (assert(n==0), luaL_register(L,NULL,l))
-# define lua_resume(L,F,n) lua_resume(L,n)
-# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
-#endif
-
-/* There is a 1-1 relation between a lua_State and a uv_loop_t
- These helpers will give you one if you have the other
- These are exposed for extensions built with luv
- This allows luv to be used in multithreaded applications.
-*/
-LUALIB_API lua_State* luv_state(uv_loop_t* loop);
-/* All libuv callbacks will lua_call directly from this root-per-thread state
-*/
-LUALIB_API uv_loop_t* luv_loop(lua_State* L);
-
-/* This is the main hook to load the library.
- This can be called multiple times in a process as long
- as you use a different lua_State and thread for each.
-*/
-LUALIB_API int luaopen_luv (lua_State *L);
-
-#include "util.h"
-#include "lhandle.h"
-#include "lreq.h"
-
-/* From stream.c */
-static uv_stream_t* luv_check_stream(lua_State* L, int index);
-static void luv_alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf);
-static void luv_check_buf(lua_State *L, int idx, uv_buf_t *pbuf);
-static uv_buf_t* luv_prep_bufs(lua_State* L, int index, size_t *count);
-
-/* from tcp.c */
-static void parse_sockaddr(lua_State* L, struct sockaddr_storage* address, int addrlen);
-static void luv_connect_cb(uv_connect_t* req, int status);
-
-/* From fs.c */
-static void luv_push_stats_table(lua_State* L, const uv_stat_t* s);
-
-/* from constants.c */
-static int luv_af_string_to_num(const char* string);
-static const char* luv_af_num_to_string(const int num);
-static int luv_sock_string_to_num(const char* string);
-static const char* luv_sock_num_to_string(const int num);
-static int luv_sig_string_to_num(const char* string);
-static const char* luv_sig_num_to_string(const int num);
-
-typedef lua_State* (*luv_acquire_vm)();
-typedef void (*luv_release_vm)(lua_State* L);
-LUALIB_API void luv_set_thread_cb(luv_acquire_vm acquire, luv_release_vm release);
-
-#endif
diff --git a/3rdparty/luv/src/misc.c b/3rdparty/luv/src/misc.c
deleted file mode 100644
index 64c9e3d5822..00000000000
--- a/3rdparty/luv/src/misc.c
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "luv.h"
-#ifdef _WIN32
-#include <process.h>
-#endif
-
-static int luv_guess_handle(lua_State* L) {
- uv_file file = luaL_checkinteger(L, 1);
- switch (uv_guess_handle(file)) {
-#define XX(uc, lc) case UV_##uc: lua_pushstring(L, #lc); break;
- UV_HANDLE_TYPE_MAP(XX)
-#undef XX
- case UV_FILE: lua_pushstring(L, "file"); break;
- default: return 0;
- }
- return 1;
-}
-
-static int luv_version(lua_State* L) {
- lua_pushinteger(L, uv_version());
- return 1;
-}
-
-static int luv_version_string(lua_State* L) {
- lua_pushstring(L, uv_version_string());
- return 1;
-}
-
-static int luv_get_process_title(lua_State* L) {
- char title[MAX_TITLE_LENGTH];
- int ret = uv_get_process_title(title, MAX_TITLE_LENGTH);
- if (ret < 0) return luv_error(L, ret);
- lua_pushstring(L, title);
- return 1;
-}
-
-static int luv_set_process_title(lua_State* L) {
- const char* title = luaL_checkstring(L, 1);
- int ret = uv_set_process_title(title);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_resident_set_memory(lua_State* L) {
- size_t rss;
- int ret = uv_resident_set_memory(&rss);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, rss);
- return 1;
-}
-
-static int luv_uptime(lua_State* L) {
- double uptime;
- int ret = uv_uptime(&uptime);
- if (ret < 0) return luv_error(L, ret);
- lua_pushnumber(L, uptime);
- return 1;
-}
-
-static void luv_push_timeval_table(lua_State* L, const uv_timeval_t* t) {
- lua_createtable(L, 0, 2);
- lua_pushinteger(L, t->tv_sec);
- lua_setfield(L, -2, "sec");
- lua_pushinteger(L, t->tv_usec);
- lua_setfield(L, -2, "usec");
-}
-
-static int luv_getrusage(lua_State* L) {
- uv_rusage_t rusage;
- int ret = uv_getrusage(&rusage);
- if (ret < 0) return luv_error(L, ret);
- lua_createtable(L, 0, 16);
- // user CPU time used
- luv_push_timeval_table(L, &rusage.ru_utime);
- lua_setfield(L, -2, "utime");
- // system CPU time used
- luv_push_timeval_table(L, &rusage.ru_stime);
- lua_setfield(L, -2, "stime");
- // maximum resident set size
- lua_pushinteger(L, rusage.ru_maxrss);
- lua_setfield(L, -2, "maxrss");
- // integral shared memory size
- lua_pushinteger(L, rusage.ru_ixrss);
- lua_setfield(L, -2, "ixrss");
- // integral unshared data size
- lua_pushinteger(L, rusage.ru_idrss);
- lua_setfield(L, -2, "idrss");
- // integral unshared stack size
- lua_pushinteger(L, rusage.ru_isrss);
- lua_setfield(L, -2, "isrss");
- // page reclaims (soft page faults)
- lua_pushinteger(L, rusage.ru_minflt);
- lua_setfield(L, -2, "minflt");
- // page faults (hard page faults)
- lua_pushinteger(L, rusage.ru_majflt);
- lua_setfield(L, -2, "majflt");
- // swaps
- lua_pushinteger(L, rusage.ru_nswap);
- lua_setfield(L, -2, "nswap");
- // block input operations
- lua_pushinteger(L, rusage.ru_inblock);
- lua_setfield(L, -2, "inblock");
- // block output operations
- lua_pushinteger(L, rusage.ru_oublock);
- lua_setfield(L, -2, "oublock");
- // IPC messages sent
- lua_pushinteger(L, rusage.ru_msgsnd);
- lua_setfield(L, -2, "msgsnd");
- // IPC messages received
- lua_pushinteger(L, rusage.ru_msgrcv);
- lua_setfield(L, -2, "msgrcv");
- // signals received
- lua_pushinteger(L, rusage.ru_nsignals);
- lua_setfield(L, -2, "nsignals");
- // voluntary context switches
- lua_pushinteger(L, rusage.ru_nvcsw);
- lua_setfield(L, -2, "nvcsw");
- // involuntary context switches
- lua_pushinteger(L, rusage.ru_nivcsw);
- lua_setfield(L, -2, "nivcsw");
- return 1;
-}
-
-static int luv_cpu_info(lua_State* L) {
- uv_cpu_info_t* cpu_infos;
- int count, i;
- int ret = uv_cpu_info(&cpu_infos, &count);
- if (ret < 0) return luv_error(L, ret);
- lua_newtable(L);
-
- for (i = 0; i < count; i++) {
- lua_newtable(L);
- lua_pushstring(L, cpu_infos[i].model);
- lua_setfield(L, -2, "model");
- lua_pushnumber(L, cpu_infos[i].speed);
- lua_setfield(L, -2, "speed");
- lua_newtable(L);
- lua_pushnumber(L, cpu_infos[i].cpu_times.user);
- lua_setfield(L, -2, "user");
- lua_pushnumber(L, cpu_infos[i].cpu_times.nice);
- lua_setfield(L, -2, "nice");
- lua_pushnumber(L, cpu_infos[i].cpu_times.sys);
- lua_setfield(L, -2, "sys");
- lua_pushnumber(L, cpu_infos[i].cpu_times.idle);
- lua_setfield(L, -2, "idle");
- lua_pushnumber(L, cpu_infos[i].cpu_times.irq);
- lua_setfield(L, -2, "irq");
- lua_setfield(L, -2, "times");
- lua_rawseti(L, -2, i + 1);
- }
-
- uv_free_cpu_info(cpu_infos, count);
- return 1;
-}
-
-static int luv_interface_addresses(lua_State* L) {
- uv_interface_address_t* interfaces;
- int count, i;
- char ip[INET6_ADDRSTRLEN];
- char netmask[INET6_ADDRSTRLEN];
-
- uv_interface_addresses(&interfaces, &count);
-
- lua_newtable(L);
-
- for (i = 0; i < count; i++) {
- lua_getfield(L, -1, interfaces[i].name);
- if (!lua_istable(L, -1)) {
- lua_pop(L, 1);
- lua_newtable(L);
- lua_pushvalue(L, -1);
- lua_setfield(L, -3, interfaces[i].name);
- }
- lua_newtable(L);
- lua_pushboolean(L, interfaces[i].is_internal);
- lua_setfield(L, -2, "internal");
-
- lua_pushlstring(L, interfaces[i].phys_addr, sizeof(interfaces[i].phys_addr));
- lua_setfield(L, -2, "mac");
-
- if (interfaces[i].address.address4.sin_family == AF_INET) {
- uv_ip4_name(&interfaces[i].address.address4, ip, sizeof(ip));
- uv_ip4_name(&interfaces[i].netmask.netmask4, netmask, sizeof(netmask));
- } else if (interfaces[i].address.address4.sin_family == AF_INET6) {
- uv_ip6_name(&interfaces[i].address.address6, ip, sizeof(ip));
- uv_ip6_name(&interfaces[i].netmask.netmask6, netmask, sizeof(netmask));
- } else {
- strncpy(ip, "<unknown sa family>", INET6_ADDRSTRLEN);
- strncpy(netmask, "<unknown sa family>", INET6_ADDRSTRLEN);
- }
- lua_pushstring(L, ip);
- lua_setfield(L, -2, "ip");
- lua_pushstring(L, netmask);
- lua_setfield(L, -2, "netmask");
-
- lua_pushstring(L, luv_af_num_to_string(interfaces[i].address.address4.sin_family));
- lua_setfield(L, -2, "family");
- lua_rawseti(L, -2, lua_rawlen (L, -2) + 1);
- lua_pop(L, 1);
- }
- uv_free_interface_addresses(interfaces, count);
- return 1;
-}
-
-static int luv_loadavg(lua_State* L) {
- double avg[3];
- uv_loadavg(avg);
- lua_pushnumber(L, avg[0]);
- lua_pushnumber(L, avg[1]);
- lua_pushnumber(L, avg[2]);
- return 3;
-}
-
-static int luv_exepath(lua_State* L) {
- size_t size = 2*PATH_MAX;
- char exe_path[2*PATH_MAX];
- int ret = uv_exepath(exe_path, &size);
- if (ret < 0) return luv_error(L, ret);
- lua_pushlstring(L, exe_path, size);
- return 1;
-}
-
-static int luv_cwd(lua_State* L) {
- size_t size = 2*PATH_MAX;
- char path[2*PATH_MAX];
- int ret = uv_cwd(path, &size);
- if (ret < 0) return luv_error(L, ret);
- lua_pushlstring(L, path, size);
- return 1;
-}
-
-static int luv_chdir(lua_State* L) {
- int ret = uv_chdir(luaL_checkstring(L, 1));
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_os_homedir(lua_State* L) {
- size_t size = 2*PATH_MAX;
- char homedir[2*PATH_MAX];
- int ret = uv_os_homedir(homedir, &size);
- if (ret < 0) return luv_error(L, ret);
- lua_pushlstring(L, homedir, size);
- return 1;
-}
-
-static int luv_get_total_memory(lua_State* L) {
- lua_pushnumber(L, uv_get_total_memory());
- return 1;
-}
-
-static int luv_get_free_memory(lua_State* L) {
- lua_pushnumber(L, uv_get_free_memory());
- return 1;
-}
-
-static int luv_hrtime(lua_State* L) {
- lua_pushnumber(L, uv_hrtime());
- return 1;
-}
-
-static int luv_getpid(lua_State* L){
- int pid = getpid();
- lua_pushinteger(L, pid);
- return 1;
-}
-
-#ifndef _WIN32
-static int luv_getuid(lua_State* L){
- int uid = getuid();
- lua_pushinteger(L, uid);
- return 1;
-}
-
-static int luv_getgid(lua_State* L){
- int gid = getgid();
- lua_pushinteger(L, gid);
- return 1;
-}
-
-static int luv_setuid(lua_State* L){
- int uid = luaL_checkinteger(L, 1);
- int r = setuid(uid);
- if (-1 == r) {
- luaL_error(L, "Error setting UID");
- }
- return 0;
-}
-
-static int luv_setgid(lua_State* L){
- int gid = luaL_checkinteger(L, 1);
- int r = setgid(gid);
- if (-1 == r) {
- luaL_error(L, "Error setting GID");
- }
- return 0;
-}
-#endif
diff --git a/3rdparty/luv/src/pipe.c b/3rdparty/luv/src/pipe.c
deleted file mode 100644
index b490c1597b3..00000000000
--- a/3rdparty/luv/src/pipe.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static uv_pipe_t* luv_check_pipe(lua_State* L, int index) {
- uv_pipe_t* handle = luv_checkudata(L, index, "uv_pipe");
- luaL_argcheck(L, handle->type == UV_NAMED_PIPE && handle->data, index, "Expected uv_pipe_t");
- return handle;
-}
-
-static int luv_new_pipe(lua_State* L) {
- uv_pipe_t* handle;
- int ipc, ret;
- luaL_checktype(L, 1, LUA_TBOOLEAN);
- ipc = lua_toboolean(L, 1);
- handle = luv_newuserdata(L, sizeof(*handle));
- ret = uv_pipe_init(luv_loop(L), handle, ipc);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static int luv_pipe_open(lua_State* L) {
- uv_pipe_t* handle = luv_check_pipe(L, 1);
- uv_file file = luaL_checkinteger(L, 2);
- int ret = uv_pipe_open(handle, file);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_pipe_bind(lua_State* L) {
- uv_pipe_t* handle = luv_check_pipe(L, 1);
- const char* name = luaL_checkstring(L, 2);
- int ret = uv_pipe_bind(handle, name);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_pipe_connect(lua_State* L) {
- uv_pipe_t* handle = luv_check_pipe(L, 1);
- const char* name = luaL_checkstring(L, 2);
- int ref = luv_check_continuation(L, 3);
- uv_connect_t* req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- uv_pipe_connect(req, handle, name, luv_connect_cb);
- return 1;
-}
-
-static int luv_pipe_getsockname(lua_State* L) {
- uv_pipe_t* handle = luv_check_pipe(L, 1);
- size_t len = 2*PATH_MAX;
- char buf[2*PATH_MAX];
- int ret = uv_pipe_getsockname(handle, buf, &len);
- if (ret < 0) return luv_error(L, ret);
- lua_pushlstring(L, buf, len);
- return 1;
-}
-
-static int luv_pipe_getpeername(lua_State* L) {
- uv_pipe_t* handle = luv_check_pipe(L, 1);
- size_t len = 2*PATH_MAX;
- char buf[2*PATH_MAX];
- int ret = uv_pipe_getpeername(handle, buf, &len);
- if (ret < 0) return luv_error(L, ret);
- lua_pushlstring(L, buf, len);
- return 1;
-}
-
-static int luv_pipe_pending_instances(lua_State* L) {
- uv_pipe_t* handle = luv_check_pipe(L, 1);
- int count = luaL_checkinteger(L, 2);
- uv_pipe_pending_instances(handle, count);
- return 0;
-}
-
-static int luv_pipe_pending_count(lua_State* L) {
- uv_pipe_t* handle = luv_check_pipe(L, 1);
- lua_pushinteger(L, uv_pipe_pending_count(handle));
- return 1;
-}
-
-static int luv_pipe_pending_type(lua_State* L) {
- uv_pipe_t* handle = luv_check_pipe(L, 1);
- uv_handle_type type = uv_pipe_pending_type(handle);
- const char* type_name;
- switch (type) {
-#define XX(uc, lc) \
- case UV_##uc: type_name = #lc; break;
- UV_HANDLE_TYPE_MAP(XX)
-#undef XX
- default: return 0;
- }
- lua_pushstring(L, type_name);
- return 1;
-}
diff --git a/3rdparty/luv/src/poll.c b/3rdparty/luv/src/poll.c
deleted file mode 100644
index e007c9f9634..00000000000
--- a/3rdparty/luv/src/poll.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static uv_poll_t* luv_check_poll(lua_State* L, int index) {
- uv_poll_t* handle = luv_checkudata(L, index, "uv_poll");
- luaL_argcheck(L, handle->type == UV_POLL && handle->data, index, "Expected uv_poll_t");
- return handle;
-}
-
-static int luv_new_poll(lua_State* L) {
- int fd = luaL_checkinteger(L, 1);
- uv_poll_t* handle = luv_newuserdata(L, sizeof(*handle));
- int ret = uv_poll_init(luv_loop(L), handle, fd);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static int luv_new_socket_poll(lua_State* L) {
- int fd = luaL_checkinteger(L, 1);
- uv_poll_t* handle = luv_newuserdata(L, sizeof(*handle));
- int ret = uv_poll_init_socket(luv_loop(L), handle, fd);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-// These are the same order as uv_run_mode which also starts at 0
-static const char *const luv_pollevents[] = {
- "r", "w", "rw", NULL
-};
-
-static void luv_poll_cb(uv_poll_t* handle, int status, int events) {
- lua_State* L = luv_state(handle->loop);
- luv_handle_t* data = handle->data;
- const char* evtstr;
-
- if (status < 0) {
- fprintf(stderr, "%s: %s\n", uv_err_name(status), uv_strerror(status));
- lua_pushstring(L, uv_err_name(status));
- }
- else {
- lua_pushnil(L);
- }
-
- switch (events) {
- case UV_READABLE: evtstr = "r"; break;
- case UV_WRITABLE: evtstr = "w"; break;
- case UV_READABLE|UV_WRITABLE: evtstr = "rw"; break;
- default: evtstr = ""; break;
- }
- lua_pushstring(L, evtstr);
-
- luv_call_callback(L, data, LUV_POLL, 2);
-}
-
-static int luv_poll_start(lua_State* L) {
- uv_poll_t* handle = luv_check_poll(L, 1);
- int events, ret;
- switch (luaL_checkoption(L, 2, "rw", luv_pollevents)) {
- case 0: events = UV_READABLE; break;
- case 1: events = UV_WRITABLE; break;
- case 2: events = UV_READABLE | UV_WRITABLE; break;
- default: events = 0; /* unreachable */
- }
- luv_check_callback(L, handle->data, LUV_POLL, 3);
- ret = uv_poll_start(handle, events, luv_poll_cb);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_poll_stop(lua_State* L) {
- uv_poll_t* handle = luv_check_poll(L, 1);
- int ret = uv_poll_stop(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
diff --git a/3rdparty/luv/src/prepare.c b/3rdparty/luv/src/prepare.c
deleted file mode 100644
index 6577439a466..00000000000
--- a/3rdparty/luv/src/prepare.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static uv_prepare_t* luv_check_prepare(lua_State* L, int index) {
- uv_prepare_t* handle = luv_checkudata(L, index, "uv_prepare");
- luaL_argcheck(L, handle->type == UV_PREPARE && handle->data, index, "Expected uv_prepare_t");
- return handle;
-}
-
-static int luv_new_prepare(lua_State* L) {
- uv_prepare_t* handle = luv_newuserdata(L, sizeof(*handle));
- int ret = uv_prepare_init(luv_loop(L), handle);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static void luv_prepare_cb(uv_prepare_t* handle) {
- lua_State* L = luv_state(handle->loop);
- luv_handle_t* data = handle->data;
- luv_call_callback(L, data, LUV_PREPARE, 0);
-}
-
-static int luv_prepare_start(lua_State* L) {
- uv_prepare_t* handle = luv_check_prepare(L, 1);
- int ret;
- luv_check_callback(L, handle->data, LUV_PREPARE, 2);
- ret = uv_prepare_start(handle, luv_prepare_cb);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_prepare_stop(lua_State* L) {
- uv_prepare_t* handle = luv_check_prepare(L, 1);
- int ret = uv_prepare_stop(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
diff --git a/3rdparty/luv/src/process.c b/3rdparty/luv/src/process.c
deleted file mode 100644
index d939503868b..00000000000
--- a/3rdparty/luv/src/process.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static int luv_disable_stdio_inheritance(lua_State* L) {
- (void)L;
- uv_disable_stdio_inheritance();
- return 0;
-}
-
-static uv_process_t* luv_check_process(lua_State* L, int index) {
- uv_process_t* handle = luv_checkudata(L, index, "uv_process");
- luaL_argcheck(L, handle->type == UV_PROCESS && handle->data, index, "Expected uv_process_t");
- return handle;
-}
-
-static void exit_cb(uv_process_t* handle, int64_t exit_status, int term_signal) {
- lua_State* L = luv_state(handle->loop);
- luv_handle_t* data = handle->data;
- lua_pushinteger(L, exit_status);
- lua_pushinteger(L, term_signal);
- luv_call_callback(L, data, LUV_EXIT, 2);
-}
-
-static void luv_spawn_close_cb(uv_handle_t* handle) {
- lua_State *L = luv_state(handle->loop);
- luv_cleanup_handle(L, handle->data);
-}
-
-static void luv_clean_options(uv_process_options_t* options) {
- free(options->args);
- free(options->stdio);
- free(options->env);
-}
-
-static int luv_spawn(lua_State* L) {
- uv_process_t* handle;
- uv_process_options_t options;
- size_t i, len = 0;
- int ret;
-
- memset(&options, 0, sizeof(options));
- options.exit_cb = exit_cb;
- options.file = luaL_checkstring(L, 1);
- options.flags = 0;
-
- // Make sure the 2nd argument is a table
- luaL_checktype(L, 2, LUA_TTABLE);
-
- // get the args list
- lua_getfield(L, 2, "args");
- // +1 for inserted command at front
- if (lua_type(L, -1) == LUA_TTABLE) {
- len = 1 + lua_rawlen(L, -1);
- }
- else if (lua_type(L, -1) != LUA_TNIL) {
- luv_clean_options(&options);
- return luaL_argerror(L, 3, "args option must be table");
- }
- else {
- len = 1;
- }
- // +1 for null terminator at end
- options.args = malloc((len + 1) * sizeof(*options.args));
- if (!options.args) {
- luv_clean_options(&options);
- return luaL_error(L, "Problem allocating args");
- }
- options.args[0] = (char*)options.file;
- for (i = 1; i < len; ++i) {
- lua_rawgeti(L, -1, i);
- options.args[i] = (char*)lua_tostring(L, -1);
- lua_pop(L, 1);
- }
- options.args[len] = NULL;
- lua_pop(L, 1);
-
- // get the stdio list
- lua_getfield(L, 2, "stdio");
- if (lua_type(L, -1) == LUA_TTABLE) {
- options.stdio_count = len = lua_rawlen(L, -1);
- options.stdio = malloc(len * sizeof(*options.stdio));
- if (!options.stdio) {
- luv_clean_options(&options);
- return luaL_error(L, "Problem allocating stdio");
- }
- for (i = 0; i < len; ++i) {
- lua_rawgeti(L, -1, i + 1);
- // integers are assumed to be file descripters
- if (lua_type(L, -1) == LUA_TNUMBER) {
- options.stdio[i].flags = UV_INHERIT_FD;
- options.stdio[i].data.fd = lua_tointeger(L, -1);
- }
- // userdata is assumed to be a uv_stream_t instance
- else if (lua_type(L, -1) == LUA_TUSERDATA) {
- uv_os_fd_t fd;
- uv_stream_t* stream = luv_check_stream(L, -1);
- int err = uv_fileno((uv_handle_t*)stream, &fd);
- if (err == UV_EINVAL || err == UV_EBADF) {
- // stdin (fd 0) is read-only, stdout and stderr (fds 1 & 2) are
- // write-only, and all fds > 2 are read-write
- int flags = UV_CREATE_PIPE;
- if (i == 0 || i > 2)
- flags |= UV_READABLE_PIPE;
- if (i != 0)
- flags |= UV_WRITABLE_PIPE;
- options.stdio[i].flags = flags;
- }
- else {
- options.stdio[i].flags = UV_INHERIT_STREAM;
- }
- options.stdio[i].data.stream = stream;
- }
- else if (lua_type(L, -1) == LUA_TNIL) {
- options.stdio[i].flags = UV_IGNORE;
- }
- else {
- luv_clean_options(&options);
- return luaL_argerror(L, 2, "stdio table entries must be nil, uv_stream_t, or integer");
- }
- lua_pop(L, 1);
- }
- }
- else if (lua_type(L, -1) != LUA_TNIL) {
- luv_clean_options(&options);
- return luaL_argerror(L, 2, "stdio option must be table");
- }
- lua_pop(L, 1);
-
- // Get the env
- lua_getfield(L, 2, "env");
- if (lua_type(L, -1) == LUA_TTABLE) {
- len = lua_rawlen(L, -1);
- options.env = malloc((len + 1) * sizeof(*options.env));
- if (!options.env) {
- luv_clean_options(&options);
- return luaL_error(L, "Problem allocating env");
- }
- for (i = 0; i < len; ++i) {
- lua_rawgeti(L, -1, i + 1);
- options.env[i] = (char*)lua_tostring(L, -1);
- lua_pop(L, 1);
- }
- options.env[len] = NULL;
- }
- else if (lua_type(L, -1) != LUA_TNIL) {
- luv_clean_options(&options);
- return luaL_argerror(L, 2, "env option must be table");
- }
- lua_pop(L, 1);
-
- // Get the cwd
- lua_getfield(L, 2, "cwd");
- if (lua_type(L, -1) == LUA_TSTRING) {
- options.cwd = (char*)lua_tostring(L, -1);
- }
- else if (lua_type(L, -1) != LUA_TNIL) {
- luv_clean_options(&options);
- return luaL_argerror(L, 2, "cwd option must be string");
- }
- lua_pop(L, 1);
-
- // Check for uid
- lua_getfield(L, 2, "uid");
- if (lua_type(L, -1) == LUA_TNUMBER) {
- options.uid = lua_tointeger(L, -1);
- options.flags |= UV_PROCESS_SETUID;
- }
- else if (lua_type(L, -1) != LUA_TNIL) {
- luv_clean_options(&options);
- return luaL_argerror(L, 2, "uid option must be number");
- }
- lua_pop(L, 1);
-
- // Check for gid
- lua_getfield(L, 2, "gid");
- if (lua_type(L, -1) == LUA_TNUMBER) {
- options.gid = lua_tointeger(L, -1);
- options.flags |= UV_PROCESS_SETGID;
- }
- else if (lua_type(L, -1) != LUA_TNIL) {
- luv_clean_options(&options);
- return luaL_argerror(L, 2, "gid option must be number");
- }
- lua_pop(L, 1);
-
- // Check for the boolean flags
- lua_getfield(L, 2, "verbatim");
- if (lua_toboolean(L, -1)) {
- options.flags |= UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS;
- }
- lua_pop(L, 1);
- lua_getfield(L, 2, "detached");
- if (lua_toboolean(L, -1)) {
- options.flags |= UV_PROCESS_DETACHED;
- }
- lua_pop(L, 1);
- lua_getfield(L, 2, "hide");
- if (lua_toboolean(L, -1)) {
- options.flags |= UV_PROCESS_WINDOWS_HIDE;
- }
- lua_pop(L, 1);
-
- handle = luv_newuserdata(L, sizeof(*handle));
- handle->type = UV_PROCESS;
- handle->data = luv_setup_handle(L);
-
- if (!lua_isnoneornil(L, 3)) {
- luv_check_callback(L, handle->data, LUV_EXIT, 3);
- }
-
- ret = uv_spawn(luv_loop(L), handle, &options);
-
- luv_clean_options(&options);
- if (ret < 0) {
- /* The async callback is required here because luajit GC may reclaim the
- * luv handle before libuv is done closing it down.
- */
- uv_close((uv_handle_t*)handle, luv_spawn_close_cb);
- return luv_error(L, ret);
- }
- lua_pushinteger(L, handle->pid);
- return 2;
-}
-
-static int luv_parse_signal(lua_State* L, int slot) {
- if (lua_isnumber(L, slot)) {
- return lua_tonumber(L, slot);
- }
- if (lua_isstring(L, slot)) {
- return luv_sig_string_to_num(lua_tostring(L, slot));
- }
- return SIGTERM;
-}
-
-static int luv_process_kill(lua_State* L) {
- uv_process_t* handle = luv_check_process(L, 1);
- int signum = luv_parse_signal(L, 2);
- int ret = uv_process_kill(handle, signum);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_kill(lua_State* L) {
- int pid = luaL_checkinteger(L, 1);
- int signum = luv_parse_signal(L, 2);
- int ret = uv_kill(pid, signum);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
diff --git a/3rdparty/luv/src/req.c b/3rdparty/luv/src/req.c
deleted file mode 100644
index 6d7b7e4a30b..00000000000
--- a/3rdparty/luv/src/req.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static uv_req_t* luv_check_req(lua_State* L, int index) {
- uv_req_t* req = luaL_checkudata(L, index, "uv_req");
- luaL_argcheck(L, req->data, index, "Expected uv_req_t");
- return req;
-}
-
-static int luv_req_tostring(lua_State* L) {
- uv_req_t* req = luaL_checkudata(L, 1, "uv_req");
- switch (req->type) {
-#define XX(uc, lc) case UV_##uc: lua_pushfstring(L, "uv_"#lc"_t: %p", req); break;
- UV_REQ_TYPE_MAP(XX)
-#undef XX
- default: lua_pushfstring(L, "uv_req_t: %p", req); break;
- }
- return 1;
-}
-
-static void luv_req_init(lua_State* L) {
- luaL_newmetatable (L, "uv_req");
- lua_pushcfunction(L, luv_req_tostring);
- lua_setfield(L, -2, "__tostring");
- lua_pop(L, 1);
-}
-
-// Metamethod to allow storing anything in the userdata's environment
-static int luv_cancel(lua_State* L) {
- uv_req_t* req = luv_check_req(L, 1);
- int ret = uv_cancel(req);
- if (ret < 0) return luv_error(L, ret);
- luv_cleanup_req(L, req->data);
- req->data = NULL;
- lua_pushinteger(L, ret);
- return 1;
-}
diff --git a/3rdparty/luv/src/schema.c b/3rdparty/luv/src/schema.c
deleted file mode 100644
index e7b82e11d66..00000000000
--- a/3rdparty/luv/src/schema.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
diff --git a/3rdparty/luv/src/signal.c b/3rdparty/luv/src/signal.c
deleted file mode 100644
index 48ace2bf601..00000000000
--- a/3rdparty/luv/src/signal.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static uv_signal_t* luv_check_signal(lua_State* L, int index) {
- uv_signal_t* handle = luv_checkudata(L, index, "uv_signal");
- luaL_argcheck(L, handle->type == UV_SIGNAL && handle->data, index, "Expected uv_signal_t");
- return handle;
-}
-
-static int luv_new_signal(lua_State* L) {
- uv_signal_t* handle = luv_newuserdata(L, sizeof(*handle));
- int ret = uv_signal_init(luv_loop(L), handle);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static void luv_signal_cb(uv_signal_t* handle, int signum) {
- lua_State* L = luv_state(handle->loop);
- luv_handle_t* data = handle->data;
- lua_pushstring(L, luv_sig_num_to_string(signum));
- luv_call_callback(L, data, LUV_SIGNAL, 1);
-}
-
-static int luv_signal_start(lua_State* L) {
- uv_signal_t* handle = luv_check_signal(L, 1);
- int signum, ret;
- if (lua_isnumber(L, 2)) {
- signum = lua_tointeger(L, 2);
- }
- else if (lua_isstring(L, 2)) {
- signum = luv_sig_string_to_num(luaL_checkstring(L, 2));
- luaL_argcheck(L, signum, 2, "Invalid Signal name");
- }
- else {
- return luaL_argerror(L, 2, "Missing Signal name");
- }
-
- if (!lua_isnoneornil(L, 3)) {
- luv_check_callback(L, handle->data, LUV_SIGNAL, 3);
- }
- ret = uv_signal_start(handle, luv_signal_cb, signum);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_signal_stop(lua_State* L) {
- uv_signal_t* handle = luv_check_signal(L, 1);
- int ret = uv_signal_stop(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
diff --git a/3rdparty/luv/src/stream.c b/3rdparty/luv/src/stream.c
deleted file mode 100644
index 5009e04f097..00000000000
--- a/3rdparty/luv/src/stream.c
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static void luv_check_buf(lua_State *L, int idx, uv_buf_t *pbuf) {
- size_t len;
- pbuf->base = (char*)luaL_checklstring(L, idx, &len);
- pbuf->len = len;
-}
-
-static uv_stream_t* luv_check_stream(lua_State* L, int index) {
- int isStream;
- uv_stream_t* handle;
- if (!(handle = *(void**) lua_touserdata(L, index))) { goto fail; }
- lua_getfield(L, LUA_REGISTRYINDEX, "uv_stream");
- lua_getmetatable(L, index < 0 ? index - 1 : index);
- lua_rawget(L, -2);
- isStream = lua_toboolean(L, -1);
- lua_pop(L, 2);
- if (isStream) { return handle; }
- fail: luaL_argerror(L, index, "Expected uv_stream userdata");
- return NULL;
-}
-
-static void luv_shutdown_cb(uv_shutdown_t* req, int status) {
- lua_State* L = luv_state(req->handle->loop);
- luv_status(L, status);
- luv_fulfill_req(L, req->data, 1);
- luv_cleanup_req(L, req->data);
- req->data = NULL;
-}
-
-static int luv_shutdown(lua_State* L) {
- uv_stream_t* handle = luv_check_stream(L, 1);
- int ref = luv_check_continuation(L, 2);
- uv_shutdown_t* req = lua_newuserdata(L, sizeof(*req));
- int ret;
- req->data = luv_setup_req(L, ref);
- ret = uv_shutdown(req, handle, luv_shutdown_cb);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- return 1;
-}
-
-static void luv_connection_cb(uv_stream_t* handle, int status) {
- lua_State* L = luv_state(handle->loop);
- luv_status(L, status);
- luv_call_callback(L, handle->data, LUV_CONNECTION, 1);
-}
-
-static int luv_listen(lua_State* L) {
- uv_stream_t* handle = luv_check_stream(L, 1);
- int backlog = luaL_checkinteger(L, 2);
- int ret;
- luv_check_callback(L, handle->data, LUV_CONNECTION, 3);
- ret = uv_listen(handle, backlog, luv_connection_cb);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_accept(lua_State* L) {
- uv_stream_t* server = luv_check_stream(L, 1);
- uv_stream_t* client = luv_check_stream(L, 2);
- int ret = uv_accept(server, client);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static void luv_alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) {
- (void)handle;
- buf->base = malloc(suggested_size);
- assert(buf->base);
- buf->len = suggested_size;
-}
-
-static void luv_read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) {
- lua_State* L = luv_state(handle->loop);
- int nargs;
-
- if (nread > 0) {
- lua_pushnil(L);
- lua_pushlstring(L, buf->base, nread);
- nargs = 2;
- }
-
- free(buf->base);
- if (nread == 0) return;
-
- if (nread == UV_EOF) {
- nargs = 0;
- }
- else if (nread < 0) {
- luv_status(L, nread);
- nargs = 1;
- }
-
- luv_call_callback(L, handle->data, LUV_READ, nargs);
-}
-
-static int luv_read_start(lua_State* L) {
- uv_stream_t* handle = luv_check_stream(L, 1);
- int ret;
- luv_check_callback(L, handle->data, LUV_READ, 2);
- ret = uv_read_start(handle, luv_alloc_cb, luv_read_cb);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_read_stop(lua_State* L) {
- uv_stream_t* handle = luv_check_stream(L, 1);
- int ret = uv_read_stop(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static void luv_write_cb(uv_write_t* req, int status) {
- lua_State* L = luv_state(req->handle->loop);
- luv_status(L, status);
- luv_fulfill_req(L, req->data, 1);
- luv_cleanup_req(L, req->data);
- req->data = NULL;
-}
-
-static uv_buf_t* luv_prep_bufs(lua_State* L, int index, size_t *count) {
- uv_buf_t *bufs;
- size_t i;
- *count = lua_rawlen(L, index);
- bufs = malloc(sizeof(uv_buf_t) * *count);
- for (i = 0; i < *count; ++i) {
- lua_rawgeti(L, index, i + 1);
- luv_check_buf(L, -1, &bufs[i]);
- lua_pop(L, 1);
- }
- return bufs;
-}
-
-static int luv_write(lua_State* L) {
- uv_stream_t* handle = luv_check_stream(L, 1);
- uv_write_t* req;
- int ret, ref;
- ref = luv_check_continuation(L, 3);
- req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- if (lua_istable(L, 2)) {
- size_t count;
- uv_buf_t *bufs = luv_prep_bufs(L, 2, &count);
- ret = uv_write(req, handle, bufs, count, luv_write_cb);
- free(bufs);
- }
- else if (lua_isstring(L, 2)) {
- uv_buf_t buf;
- luv_check_buf(L, 2, &buf);
- ret = uv_write(req, handle, &buf, 1, luv_write_cb);
- }
- else {
- return luaL_argerror(L, 2, "data must be string or table of strings");
- }
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- lua_pushvalue(L, 2);
- ((luv_req_t*)req->data)->data_ref = luaL_ref(L, LUA_REGISTRYINDEX);
- return 1;
-}
-
-static int luv_write2(lua_State* L) {
- uv_stream_t* handle = luv_check_stream(L, 1);
- uv_write_t* req;
- int ret, ref;
- uv_stream_t* send_handle;
- send_handle = luv_check_stream(L, 3);
- ref = luv_check_continuation(L, 4);
- req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- if (lua_istable(L, 2)) {
- size_t count;
- uv_buf_t *bufs = luv_prep_bufs(L, 2, &count);
- ret = uv_write2(req, handle, bufs, count, send_handle, luv_write_cb);
- free(bufs);
- }
- else if (lua_isstring(L, 2)) {
- uv_buf_t buf;
- luv_check_buf(L, 2, &buf);
- ret = uv_write2(req, handle, &buf, 1, send_handle, luv_write_cb);
- }
- else {
- return luaL_argerror(L, 2, "data must be string or table of strings");
- }
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- lua_pushvalue(L, 2);
- ((luv_req_t*)req->data)->data_ref = luaL_ref(L, LUA_REGISTRYINDEX);
- return 1;
-}
-
-static int luv_try_write(lua_State* L) {
- uv_stream_t* handle = luv_check_stream(L, 1);
- int ret;
- if (lua_istable(L, 2)) {
- size_t count;
- uv_buf_t *bufs = luv_prep_bufs(L, 2, &count);
- ret = uv_try_write(handle, bufs, count);
- free(bufs);
- }
- else if (lua_isstring(L, 2)) {
- uv_buf_t buf;
- luv_check_buf(L, 2, &buf);
- ret = uv_try_write(handle, &buf, 1);
- }
- else {
- return luaL_argerror(L, 2, "data must be string or table of strings");
- }
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_is_readable(lua_State* L) {
- uv_stream_t* handle = luv_check_stream(L, 1);
- lua_pushboolean(L, uv_is_readable(handle));
- return 1;
-}
-
-static int luv_is_writable(lua_State* L) {
- uv_stream_t* handle = luv_check_stream(L, 1);
- lua_pushboolean(L, uv_is_writable(handle));
- return 1;
-}
-
-static int luv_stream_set_blocking(lua_State* L) {
- uv_stream_t* handle = luv_check_stream(L, 1);
- int blocking, ret;
- luaL_checktype(L, 2, LUA_TBOOLEAN);
- blocking = lua_toboolean(L, 2);
- ret = uv_stream_set_blocking(handle, blocking);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
diff --git a/3rdparty/luv/src/tcp.c b/3rdparty/luv/src/tcp.c
deleted file mode 100644
index 7ffef5ae763..00000000000
--- a/3rdparty/luv/src/tcp.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static uv_tcp_t* luv_check_tcp(lua_State* L, int index) {
- uv_tcp_t* handle = luv_checkudata(L, index, "uv_tcp");
- luaL_argcheck(L, handle->type == UV_TCP && handle->data, index, "Expected uv_tcp_t");
- return handle;
-}
-
-static int luv_new_tcp(lua_State* L) {
- uv_tcp_t* handle = luv_newuserdata(L, sizeof(*handle));
- int ret = uv_tcp_init(luv_loop(L), handle);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static int luv_tcp_open(lua_State* L) {
- uv_tcp_t* handle = luv_check_tcp(L, 1);
- uv_os_sock_t sock = luaL_checkinteger(L, 2);
- int ret = uv_tcp_open(handle, sock);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_tcp_nodelay(lua_State* L) {
- uv_tcp_t* handle = luv_check_tcp(L, 1);
- int ret, enable;
- luaL_checktype(L, 2, LUA_TBOOLEAN);
- enable = lua_toboolean(L, 2);
- ret = uv_tcp_nodelay(handle, enable);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_tcp_keepalive(lua_State* L) {
- uv_tcp_t* handle = luv_check_tcp(L, 1);
- int ret, enable;
- unsigned int delay = 0;
- luaL_checktype(L, 2, LUA_TBOOLEAN);
- enable = lua_toboolean(L, 2);
- if (enable) {
- delay = luaL_checkinteger(L, 3);
- }
- ret = uv_tcp_keepalive(handle, enable, delay);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_tcp_simultaneous_accepts(lua_State* L) {
- uv_tcp_t* handle = luv_check_tcp(L, 1);
- int ret, enable;
- luaL_checktype(L, 2, LUA_TBOOLEAN);
- enable = lua_toboolean(L, 2);
- ret = uv_tcp_simultaneous_accepts(handle, enable);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_tcp_bind(lua_State* L) {
- uv_tcp_t* handle = luv_check_tcp(L, 1);
- const char* host = luaL_checkstring(L, 2);
- int port = luaL_checkinteger(L, 3);
- unsigned int flags = 0;
- struct sockaddr_storage addr;
- int ret;
- if (uv_ip4_addr(host, port, (struct sockaddr_in*)&addr) &&
- uv_ip6_addr(host, port, (struct sockaddr_in6*)&addr)) {
- return luaL_error(L, "Invalid IP address or port [%s:%d]", host, port);
- }
- if (lua_type(L, 4) == LUA_TTABLE) {
- lua_getfield(L, 4, "ipv6only");
- if (lua_toboolean(L, -1)) flags |= UV_TCP_IPV6ONLY;
- lua_pop(L, 1);
- }
- ret = uv_tcp_bind(handle, (struct sockaddr*)&addr, flags);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static void parse_sockaddr(lua_State* L, struct sockaddr_storage* address, int addrlen) {
- char ip[INET6_ADDRSTRLEN];
- int port = 0;
- lua_newtable(L);
- if (address->ss_family == AF_INET) {
- struct sockaddr_in* addrin = (struct sockaddr_in*)address;
- uv_inet_ntop(AF_INET, &(addrin->sin_addr), ip, addrlen);
- port = ntohs(addrin->sin_port);
- } else if (address->ss_family == AF_INET6) {
- struct sockaddr_in6* addrin6 = (struct sockaddr_in6*)address;
- uv_inet_ntop(AF_INET6, &(addrin6->sin6_addr), ip, addrlen);
- port = ntohs(addrin6->sin6_port);
- }
-
- lua_pushstring(L, luv_af_num_to_string(address->ss_family));
- lua_setfield(L, -2, "family");
- lua_pushinteger(L, port);
- lua_setfield(L, -2, "port");
- lua_pushstring(L, ip);
- lua_setfield(L, -2, "ip");
-}
-
-static int luv_tcp_getsockname(lua_State* L) {
- uv_tcp_t* handle = luv_check_tcp(L, 1);
- struct sockaddr_storage address;
- int addrlen = sizeof(address);
- int ret = uv_tcp_getsockname(handle, (struct sockaddr*)&address, &addrlen);
- if (ret < 0) return luv_error(L, ret);
- parse_sockaddr(L, &address, addrlen);
- return 1;
-}
-
-static int luv_tcp_getpeername(lua_State* L) {
- uv_tcp_t* handle = luv_check_tcp(L, 1);
- struct sockaddr_storage address;
- int addrlen = sizeof(address);
- int ret = uv_tcp_getpeername(handle, (struct sockaddr*)&address, &addrlen);
- if (ret < 0) return luv_error(L, ret);
- parse_sockaddr(L, &address, addrlen);
- return 1;
-}
-
-
-static void luv_connect_cb(uv_connect_t* req, int status) {
- lua_State* L = luv_state(req->handle->loop);
- luv_status(L, status);
- luv_fulfill_req(L, req->data, 1);
- luv_cleanup_req(L, req->data);
- req->data = NULL;
-}
-
-static int luv_write_queue_size(lua_State* L) {
- uv_tcp_t* handle = luv_check_tcp(L, 1);
- lua_pushinteger(L, handle->write_queue_size);
- return 1;
-}
-
-static int luv_tcp_connect(lua_State* L) {
- uv_tcp_t* handle = luv_check_tcp(L, 1);
- const char* host = luaL_checkstring(L, 2);
- int port = luaL_checkinteger(L, 3);
- struct sockaddr_storage addr;
- uv_connect_t* req;
- int ret, ref;
- if (uv_ip4_addr(host, port, (struct sockaddr_in*)&addr) &&
- uv_ip6_addr(host, port, (struct sockaddr_in6*)&addr)) {
- return luaL_error(L, "Invalid IP address or port [%s:%d]", host, port);
- }
- ref = luv_check_continuation(L, 4);
-
- req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- ret = uv_tcp_connect(req, handle, (struct sockaddr*)&addr, luv_connect_cb);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- return 1;
-}
diff --git a/3rdparty/luv/src/thread.c b/3rdparty/luv/src/thread.c
deleted file mode 100644
index cc53011e6ed..00000000000
--- a/3rdparty/luv/src/thread.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
-* Copyright 2014 The Luvit Authors. All Rights Reserved.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
-#include "luv.h"
-#include "lthreadpool.h"
-
-typedef struct {
- uv_thread_t handle;
- char* code;
- int len;
- int argc;
- luv_thread_arg_t arg;
-} luv_thread_t;
-
-static luv_acquire_vm acquire_vm_cb = NULL;
-static luv_release_vm release_vm_cb = NULL;
-
-static lua_State* luv_thread_acquire_vm() {
- lua_State* L = luaL_newstate();
-
- // Add in the lua standard libraries
- luaL_openlibs(L);
-
- // Get package.loaded, so we can store uv in it.
- lua_getglobal(L, "package");
- lua_getfield(L, -1, "loaded");
- lua_remove(L, -2); // Remove package
-
- // Store uv module definition at loaded.uv
- luaopen_luv(L);
- lua_setfield(L, -2, "luv");
- lua_pop(L, 1);
-
- return L;
-}
-
-static void luv_thread_release_vm(lua_State* L) {
- lua_close(L);
-}
-
-static int luv_thread_arg_set(lua_State* L, luv_thread_arg_t* args, int idx, int top, int flag)
-{
- int i;
- idx = idx > 0 ? idx : 1;
- i = idx;
- while (i <= top && i <= LUV_THREAD_MAXNUM_ARG + idx)
- {
- luv_val_t *arg = args->argv + i - idx;
- arg->type = lua_type(L, i);
- switch (arg->type)
- {
- case LUA_TNIL:
- break;
- case LUA_TBOOLEAN:
- arg->val.boolean = lua_toboolean(L, i);
- break;
- case LUA_TNUMBER:
- arg->val.num = lua_tonumber(L, i);
- break;
- case LUA_TLIGHTUSERDATA:
- arg->val.userdata = lua_touserdata(L, i);
- break;
- case LUA_TSTRING:
- {
- const char* p = lua_tolstring(L, i, &arg->val.str.len);
- arg->val.str.base = malloc(arg->val.str.len);
- if (arg->val.str.base == NULL)
- {
- perror("out of memory");
- return 0;
- }
- memcpy((void*)arg->val.str.base, p, arg->val.str.len);
- break;
- }
- case LUA_TUSERDATA:
- if (flag == 1) {
- arg->val.userdata = luv_check_handle(L, i);
- break;
- }
- default:
- fprintf(stderr, "Error: thread arg not support type '%s' at %d",
- luaL_typename(L, arg->type), i);
- exit(-1);
- break;
- }
- i++;
- }
- args->argc = i - idx;
- return args->argc;
-}
-
-static void luv_thread_arg_clear(luv_thread_arg_t* args) {
- int i;
- for (i = 0; i < args->argc; i++)
- {
- if (args->argv[i].type == LUA_TSTRING)
- {
- free((void*)args->argv[i].val.str.base);
- }
- }
- memset(args, 0, sizeof(*args));
- args->argc = 0;
-}
-
-static void luv_thread_setup_handle(lua_State* L, uv_handle_t* handle) {
- *(void**) lua_newuserdata(L, sizeof(void*)) = handle;
-
-#define XX(uc, lc) case UV_##uc: \
- luaL_getmetatable(L, "uv_"#lc); \
- break;
- switch (handle->type) {
- UV_HANDLE_TYPE_MAP(XX)
- default:
- luaL_error(L, "Unknown handle type");
- }
-#undef XX
-
- lua_setmetatable(L, -2);
-}
-
-static int luv_thread_arg_push(lua_State* L, const luv_thread_arg_t* args) {
- int i = 0;
- while (i < args->argc)
- {
- const luv_val_t* arg = args->argv + i;
- switch (arg->type)
- {
- case LUA_TNIL:
- lua_pushnil(L);
- break;
- case LUA_TBOOLEAN:
- lua_pushboolean(L, arg->val.boolean);
- break;
- case LUA_TLIGHTUSERDATA:
- lua_pushlightuserdata(L, arg->val.userdata);
- break;
- case LUA_TNUMBER:
- lua_pushnumber(L, arg->val.num);
- break;
- case LUA_TSTRING:
- lua_pushlstring(L, arg->val.str.base, arg->val.str.len);
- break;
- case LUA_TUSERDATA:
- luv_thread_setup_handle(L, arg->val.userdata);
- break;
- default:
- fprintf(stderr, "Error: thread arg not support type %s at %d",
- luaL_typename(L, arg->type), i + 1);
- }
- i++;
- };
- return i;
-}
-
-int thread_dump(lua_State* L, const void* p, size_t sz, void* B)
-{
- (void)L;
- luaL_addlstring((luaL_Buffer*) B, (const char*) p, sz);
- return 0;
-}
-
-static const char* luv_thread_dumped(lua_State* L, int idx, size_t* l) {
- if (lua_isstring(L, idx)) {
- return lua_tolstring(L, idx, l);
- } else {
- const char* buff = NULL;
- int top = lua_gettop(L);
- luaL_Buffer b;
- luaL_checktype(L, idx, LUA_TFUNCTION);
- lua_pushvalue(L, idx);
- luaL_buffinit(L, &b);
-#if LUA_VERSION_NUM>=503
- int test_lua_dump = (lua_dump(L, thread_dump, &b, 1) == 0);
-#else
- int test_lua_dump = (lua_dump(L, thread_dump, &b) == 0);
-#endif
- if (test_lua_dump) {
- luaL_pushresult(&b);
- buff = lua_tolstring(L, -1, l);
- } else
- luaL_error(L, "Error: unable to dump given function");
- lua_settop(L, top);
-
- return buff;
- }
-}
-
-static luv_thread_t* luv_check_thread(lua_State* L, int index)
-{
- luv_thread_t* thread = luaL_checkudata(L, index, "uv_thread");
- return thread;
-}
-
-static int luv_thread_gc(lua_State* L) {
- luv_thread_t* tid = luv_check_thread(L, 1);
- free(tid->code);
- tid->code = NULL;
- tid->len = 0;
- luv_thread_arg_clear(&tid->arg);
- return 0;
-}
-
-static int luv_thread_tostring(lua_State* L)
-{
- luv_thread_t* thd = luv_check_thread(L, 1);
- lua_pushfstring(L, "uv_thread_t: %p", thd->handle);
- return 1;
-}
-
-static void luv_thread_cb(void* varg) {
- luv_thread_t* thd = (luv_thread_t*)varg;
- lua_State* L = acquire_vm_cb();
- if (luaL_loadbuffer(L, thd->code, thd->len, "=thread") == 0)
- {
- int top = lua_gettop(L);
- int i = luv_thread_arg_push(L, &thd->arg);
-
- for (i = 0; i < thd->arg.argc; i++) {
- if (thd->arg.argv[i].type == LUA_TUSERDATA) {
- lua_pushlightuserdata(L, thd->arg.argv[i].val.userdata);
- lua_pushvalue(L, top + i + 1);
- lua_rawset(L, LUA_REGISTRYINDEX);
- }
- }
-
- if (lua_pcall(L, i, 0, 0)) {
- fprintf(stderr, "Uncaught Error in thread: %s\n", lua_tostring(L, -1));
- }
-
- for (i = 0; i < thd->arg.argc; i++) {
- if (thd->arg.argv[i].type == LUA_TUSERDATA) {
- lua_pushlightuserdata(L, thd->arg.argv[i].val.userdata);
- lua_rawget(L, LUA_REGISTRYINDEX);
- lua_pushnil(L);
- lua_setmetatable(L, -2);
- lua_pop(L, 1);
-
- lua_pushlightuserdata(L, thd->arg.argv[i].val.userdata);
- lua_pushnil(L);
- lua_rawset(L, LUA_REGISTRYINDEX);
- }
- }
-
- } else {
- fprintf(stderr, "Uncaught Error: %s\n", lua_tostring(L, -1));
- }
- release_vm_cb(L);
-}
-
-static int luv_new_thread(lua_State* L) {
- int ret;
- size_t len;
- const char* buff;
- luv_thread_t* thread;
- thread = lua_newuserdata(L, sizeof(*thread));
- memset(thread, 0, sizeof(*thread));
- luaL_getmetatable(L, "uv_thread");
- lua_setmetatable(L, -2);
-
- buff = luv_thread_dumped(L, 1, &len);
-
- thread->argc = luv_thread_arg_set(L, &thread->arg, 2, lua_gettop(L) - 1, 1);
- thread->len = len;
- thread->code = malloc(thread->len);
- memcpy(thread->code, buff, len);
-
- ret = uv_thread_create(&thread->handle, luv_thread_cb, thread);
- if (ret < 0) return luv_error(L, ret);
-
- return 1;
-}
-
-static int luv_thread_join(lua_State* L) {
- luv_thread_t* tid = luv_check_thread(L, 1);
- int ret = uv_thread_join(&tid->handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushboolean(L, 1);
- return 1;
-}
-
-static int luv_thread_self(lua_State* L)
-{
- luv_thread_t* thread;
- uv_thread_t t = uv_thread_self();
- thread = lua_newuserdata(L, sizeof(*thread));
- memset(thread, 0, sizeof(*thread));
- memcpy(&thread->handle, &t, sizeof(t));
- luaL_getmetatable(L, "uv_thread");
- lua_setmetatable(L, -2);
- return 1;
-}
-
-static int luv_thread_equal(lua_State* L) {
- luv_thread_t* t1 = luv_check_thread(L, 1);
- luv_thread_t* t2 = luv_check_thread(L, 2);
- int ret = uv_thread_equal(&t1->handle, &t2->handle);
- lua_pushboolean(L, ret);
- return 1;
-}
-
-/* Pause the calling thread for a number of milliseconds. */
-static int luv_thread_sleep(lua_State* L) {
-#ifdef _WIN32
- DWORD msec = luaL_checkinteger(L, 1);
- Sleep(msec);
-#else
- lua_Integer msec = luaL_checkinteger(L, 1);
- usleep(msec * 1000);
-#endif
- return 0;
-}
-
-static const luaL_Reg luv_thread_methods[] = {
- {"equal", luv_thread_equal},
- {"join", luv_thread_join},
- {NULL, NULL}
-};
-
-static void luv_thread_init(lua_State* L) {
- luaL_newmetatable(L, "uv_thread");
- lua_pushcfunction(L, luv_thread_tostring);
- lua_setfield(L, -2, "__tostring");
- lua_pushcfunction(L, luv_thread_equal);
- lua_setfield(L, -2, "__eq");
- lua_pushcfunction(L, luv_thread_gc);
- lua_setfield(L, -2, "__gc");
- lua_newtable(L);
- luaL_setfuncs(L, luv_thread_methods, 0);
- lua_setfield(L, -2, "__index");
- lua_pop(L, 1);
-
- if (acquire_vm_cb == NULL) acquire_vm_cb = luv_thread_acquire_vm;
- if (release_vm_cb == NULL) release_vm_cb = luv_thread_release_vm;
-}
-
-LUALIB_API void luv_set_thread_cb(luv_acquire_vm acquire, luv_release_vm release)
-{
- acquire_vm_cb = acquire;
- release_vm_cb = release;
-}
diff --git a/3rdparty/luv/src/timer.c b/3rdparty/luv/src/timer.c
deleted file mode 100644
index b283f1fc8b2..00000000000
--- a/3rdparty/luv/src/timer.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static uv_timer_t* luv_check_timer(lua_State* L, int index) {
- uv_timer_t* handle = luv_checkudata(L, index, "uv_timer");
- luaL_argcheck(L, handle->type == UV_TIMER && handle->data, index, "Expected uv_timer_t");
- return handle;
-}
-
-static int luv_new_timer(lua_State* L) {
- uv_timer_t* handle = luv_newuserdata(L, sizeof(*handle));
- int ret = uv_timer_init(luv_loop(L), handle);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static void luv_timer_cb(uv_timer_t* handle) {
- lua_State* L = luv_state(handle->loop);
- luv_handle_t* data = handle->data;
- luv_call_callback(L, data, LUV_TIMEOUT, 0);
-}
-
-static int luv_timer_start(lua_State* L) {
- uv_timer_t* handle = luv_check_timer(L, 1);
- uint64_t timeout;
- uint64_t repeat;
- int ret;
- timeout = luaL_checkinteger(L, 2);
- repeat = luaL_checkinteger(L, 3);
- luv_check_callback(L, handle->data, LUV_TIMEOUT, 4);
- ret = uv_timer_start(handle, luv_timer_cb, timeout, repeat);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_timer_stop(lua_State* L) {
- uv_timer_t* handle = luv_check_timer(L, 1);
- int ret = uv_timer_stop(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_timer_again(lua_State* L) {
- uv_timer_t* handle = luv_check_timer(L, 1);
- int ret = uv_timer_again(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_timer_set_repeat(lua_State* L) {
- uv_timer_t* handle = luv_check_timer(L, 1);
- uint64_t repeat = luaL_checkinteger(L, 2);
- uv_timer_set_repeat(handle, repeat);
- return 0;
-}
-
-static int luv_timer_get_repeat(lua_State* L) {
- uv_timer_t* handle = luv_check_timer(L, 1);
- uint64_t repeat = uv_timer_get_repeat(handle);
- lua_pushinteger(L, repeat);
- return 1;
-}
diff --git a/3rdparty/luv/src/tty.c b/3rdparty/luv/src/tty.c
deleted file mode 100644
index 9232dc07603..00000000000
--- a/3rdparty/luv/src/tty.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static uv_tty_t* luv_check_tty(lua_State* L, int index) {
- uv_tty_t* handle = luv_checkudata(L, index, "uv_tty");
- luaL_argcheck(L, handle->type == UV_TTY && handle->data, index, "Expected uv_tty_t");
- return handle;
-}
-
-static int luv_new_tty(lua_State* L) {
- int readable, ret;
- uv_tty_t* handle;
- uv_file fd = luaL_checkinteger(L, 1);
- luaL_checktype(L, 2, LUA_TBOOLEAN);
- readable = lua_toboolean(L, 2);
- handle = luv_newuserdata(L, sizeof(*handle));
- ret = uv_tty_init(luv_loop(L), handle, fd, readable);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static int luv_tty_set_mode(lua_State* L) {
- uv_tty_t* handle = luv_check_tty(L, 1);
- int mode = luaL_checkinteger(L, 2);
- int ret = uv_tty_set_mode(handle, mode);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_tty_reset_mode(lua_State* L) {
- int ret = uv_tty_reset_mode();
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_tty_get_winsize(lua_State* L) {
- uv_tty_t* handle = luv_check_tty(L, 1);
- int width, height;
- int ret = uv_tty_get_winsize(handle, &width, &height);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, width);
- lua_pushinteger(L, height);
- return 2;
-}
diff --git a/3rdparty/luv/src/udp.c b/3rdparty/luv/src/udp.c
deleted file mode 100644
index 9cc25555559..00000000000
--- a/3rdparty/luv/src/udp.c
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-static uv_udp_t* luv_check_udp(lua_State* L, int index) {
- uv_udp_t* handle = luv_checkudata(L, index, "uv_udp");
- luaL_argcheck(L, handle->type == UV_UDP && handle->data, index, "Expected uv_udp_t");
- return handle;
-}
-
-static int luv_new_udp(lua_State* L) {
- uv_udp_t* handle = luv_newuserdata(L, sizeof(*handle));
- int ret = uv_udp_init(luv_loop(L), handle);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- handle->data = luv_setup_handle(L);
- return 1;
-}
-
-static int luv_udp_open(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- uv_os_sock_t sock = luaL_checkinteger(L, 2);
- int ret = uv_udp_open(handle, sock);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_udp_bind(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- const char* host = luaL_checkstring(L, 2);
- int port = luaL_checkinteger(L, 3);
- unsigned int flags = 0;
- struct sockaddr_storage addr;
- int ret;
- if (uv_ip4_addr(host, port, (struct sockaddr_in*)&addr) &&
- uv_ip6_addr(host, port, (struct sockaddr_in6*)&addr)) {
- return luaL_error(L, "Invalid IP address or port [%s:%d]", host, port);
- }
- if (lua_type(L, 4) == LUA_TTABLE) {
- luaL_checktype(L, 4, LUA_TTABLE);
- lua_getfield(L, 4, "reuseaddr");
- if (lua_toboolean(L, -1)) flags |= UV_UDP_REUSEADDR;
- lua_pop(L, 1);
- lua_getfield(L, 4, "ipv6only");
- if (lua_toboolean(L, -1)) flags |= UV_UDP_IPV6ONLY;
- lua_pop(L, 1);
- }
- ret = uv_udp_bind(handle, (struct sockaddr*)&addr, flags);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_udp_getsockname(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- struct sockaddr_storage address;
- int addrlen = sizeof(address);
- int ret = uv_udp_getsockname(handle, (struct sockaddr*)&address, &addrlen);
- if (ret < 0) return luv_error(L, ret);
- parse_sockaddr(L, &address, addrlen);
- return 1;
-}
-
-// These are the same order as uv_membership which also starts at 0
-static const char *const luv_membership_opts[] = {
- "leave", "join", NULL
-};
-
-static int luv_udp_set_membership(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- const char* multicast_addr = luaL_checkstring(L, 2);
- const char* interface_addr = luaL_checkstring(L, 3);
- uv_membership membership = luaL_checkoption(L, 4, NULL, luv_membership_opts);
- int ret = uv_udp_set_membership(handle, multicast_addr, interface_addr, membership);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_udp_set_multicast_loop(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- int on, ret;
- luaL_checktype(L, 2, LUA_TBOOLEAN);
- on = lua_toboolean(L, 2);
- ret = uv_udp_set_multicast_loop(handle, on);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_udp_set_multicast_ttl(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- int ttl, ret;
- ttl = luaL_checkinteger(L, 2);
- ret = uv_udp_set_multicast_ttl(handle, ttl);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_udp_set_multicast_interface(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- const char* interface_addr = luaL_checkstring(L, 2);
- int ret = uv_udp_set_multicast_interface(handle, interface_addr);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_udp_set_broadcast(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- int on, ret;
- luaL_checktype(L, 2, LUA_TBOOLEAN);
- on = lua_toboolean(L, 2);
- ret =uv_udp_set_broadcast(handle, on);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_udp_set_ttl(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- int ttl, ret;
- ttl = luaL_checknumber(L, 2);
- ret = uv_udp_set_ttl(handle, ttl);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static void luv_udp_send_cb(uv_udp_send_t* req, int status) {
- lua_State* L = luv_state(req->handle->loop);
- luv_status(L, status);
- luv_fulfill_req(L, req->data, 1);
- luv_cleanup_req(L, req->data);
- req->data = NULL;
-}
-
-static int luv_udp_send(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- uv_udp_send_t* req;
- uv_buf_t buf;
- int ret, port, ref;
- const char* host;
- struct sockaddr_storage addr;
- luv_check_buf(L, 2, &buf);
- host = luaL_checkstring(L, 3);
- port = luaL_checkinteger(L, 4);
- if (uv_ip4_addr(host, port, (struct sockaddr_in*)&addr) &&
- uv_ip6_addr(host, port, (struct sockaddr_in6*)&addr)) {
- return luaL_error(L, "Invalid IP address or port [%s:%d]", host, port);
- }
- ref = luv_check_continuation(L, 5);
- req = lua_newuserdata(L, sizeof(*req));
- req->data = luv_setup_req(L, ref);
- ret = uv_udp_send(req, handle, &buf, 1, (struct sockaddr*)&addr, luv_udp_send_cb);
- if (ret < 0) {
- lua_pop(L, 1);
- return luv_error(L, ret);
- }
- return 1;
-
-}
-
-static int luv_udp_try_send(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- uv_buf_t buf;
- int ret, port;
- const char* host;
- struct sockaddr_storage addr;
- luv_check_buf(L, 2, &buf);
- host = luaL_checkstring(L, 3);
- port = luaL_checkinteger(L, 4);
- if (uv_ip4_addr(host, port, (struct sockaddr_in*)&addr) &&
- uv_ip6_addr(host, port, (struct sockaddr_in6*)&addr)) {
- return luaL_error(L, "Invalid IP address or port [%s:%d]", host, port);
- }
- ret = uv_udp_try_send(handle, &buf, 1, (struct sockaddr*)&addr);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static void luv_udp_recv_cb(uv_udp_t* handle, ssize_t nread, const uv_buf_t* buf, const struct sockaddr* addr, unsigned flags) {
- lua_State* L = luv_state(handle->loop);
-
- // err
- if (nread < 0) {
- luv_status(L, nread);
- }
- else {
- lua_pushnil(L);
- }
-
- // data
- if (nread == 0) {
- if (addr) {
- lua_pushstring(L, "");
- }
- else {
- lua_pushnil(L);
- }
- }
- else if (nread > 0) {
- lua_pushlstring(L, buf->base, nread);
- }
- if (buf) free(buf->base);
-
- // address
- if (addr) {
- parse_sockaddr(L, (struct sockaddr_storage*)addr, sizeof *addr);
- }
- else {
- lua_pushnil(L);
- }
-
- // flags
- lua_newtable(L);
- if (flags & UV_UDP_PARTIAL) {
- lua_pushboolean(L, 1);
- lua_setfield(L, -2, "partial");
- }
-
- luv_call_callback(L, handle->data, LUV_RECV, 4);
-}
-
-static int luv_udp_recv_start(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- int ret;
- luv_check_callback(L, handle->data, LUV_RECV, 2);
- ret = uv_udp_recv_start(handle, luv_alloc_cb, luv_udp_recv_cb);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
-
-static int luv_udp_recv_stop(lua_State* L) {
- uv_udp_t* handle = luv_check_udp(L, 1);
- int ret = uv_udp_recv_stop(handle);
- if (ret < 0) return luv_error(L, ret);
- lua_pushinteger(L, ret);
- return 1;
-}
diff --git a/3rdparty/luv/src/util.c b/3rdparty/luv/src/util.c
deleted file mode 100644
index c7b98c1759a..00000000000
--- a/3rdparty/luv/src/util.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include "luv.h"
-
-void luv_stack_dump(lua_State* L, const char* name) {
- int i, l;
- fprintf(stderr, "\nAPI STACK DUMP %p %d: %s\n", L, lua_status(L), name);
- for (i = 1, l = lua_gettop(L); i <= l; i++) {
- int type = lua_type(L, i);
- switch (type) {
- case LUA_TSTRING:
- fprintf(stderr, " %d %s \"%s\"\n", i, lua_typename(L, type), lua_tostring(L, i));
- break;
- case LUA_TNUMBER:
- fprintf(stderr, " %d %s %ld\n", i, lua_typename(L, type), (long int) lua_tointeger(L, i));
- break;
- case LUA_TUSERDATA:
- fprintf(stderr, " %d %s %p\n", i, lua_typename(L, type), lua_touserdata(L, i));
- break;
- default:
- fprintf(stderr, " %d %s\n", i, lua_typename(L, type));
- break;
- }
- }
- assert(l == lua_gettop(L));
-}
-
-static int luv_error(lua_State* L, int status) {
- lua_pushnil(L);
- lua_pushfstring(L, "%s: %s", uv_err_name(status), uv_strerror(status));
- lua_pushstring(L, uv_err_name(status));
- return 3;
-}
-
-static void luv_status(lua_State* L, int status) {
- if (status < 0) {
- lua_pushstring(L, uv_err_name(status));
- }
- else {
- lua_pushnil(L);
- }
-}
diff --git a/3rdparty/luv/src/util.h b/3rdparty/luv/src/util.h
deleted file mode 100644
index c669c0430db..00000000000
--- a/3rdparty/luv/src/util.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2014 The Luvit Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#ifndef LUV_UTIL_H
-#define LUV_UTIL_H
-
-#include "luv.h"
-
-void luv_stack_dump(lua_State* L, const char* name);
-static int luv_error(lua_State* L, int ret);
-static void luv_status(lua_State* L, int status);
-
-#endif
diff --git a/3rdparty/luv/src/work.c b/3rdparty/luv/src/work.c
deleted file mode 100644
index e40212f1e7c..00000000000
--- a/3rdparty/luv/src/work.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
-* Copyright 2014 The Luvit Authors. All Rights Reserved.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
-#include "luv.h"
-
-#include "lthreadpool.h"
-
-typedef struct {
- lua_State* L; /* vm in main */
- char* code; /* thread entry code */
- size_t len;
-
- uv_async_t async;
- int async_cb; /* ref, run in main, call when async message received, NYI */
- int after_work_cb; /* ref, run in main ,call after work cb*/
-} luv_work_ctx_t;
-
-typedef struct {
- uv_work_t work;
- luv_work_ctx_t* ctx;
-
- luv_thread_arg_t arg;
-} luv_work_t;
-
-static uv_key_t L_key;
-
-static luv_work_ctx_t* luv_check_work_ctx(lua_State* L, int index)
-{
- luv_work_ctx_t* ctx = luaL_checkudata(L, index, "luv_work_ctx");
- return ctx;
-}
-
-static int luv_work_ctx_gc(lua_State *L)
-{
- luv_work_ctx_t* ctx = luv_check_work_ctx(L, 1);
- free(ctx->code);
- luaL_unref(L, LUA_REGISTRYINDEX, ctx->after_work_cb);
- luaL_unref(L, LUA_REGISTRYINDEX, ctx->async_cb);
-
- return 0;
-}
-
-static int luv_work_ctx_tostring(lua_State* L)
-{
- luv_work_ctx_t* ctx = luv_check_work_ctx(L, 1);
- lua_pushfstring(L, "luv_work_ctx_t: %p", ctx);
- return 1;
-}
-
-static void luv_work_cb(uv_work_t* req)
-{
- luv_work_t* work = req->data;
- luv_work_ctx_t* ctx = work->ctx;
- lua_State *L = uv_key_get(&L_key);
- int top;
- if (L == NULL) {
- /* vm reuse in threadpool */
- L = acquire_vm_cb();
- uv_key_set(&L_key, L);
- }
-
- top = lua_gettop(L);
- lua_pushlstring(L, ctx->code, ctx->len);
- lua_rawget(L, LUA_REGISTRYINDEX);
- if (lua_isnil(L, -1))
- {
- lua_pop(L, 1);
-
- lua_pushlstring(L, ctx->code, ctx->len);
- if (luaL_loadbuffer(L, ctx->code, ctx->len, "=pool") != 0)
- {
- fprintf(stderr, "Uncaught Error: %s\n", lua_tostring(L, -1));
- lua_pop(L, 2);
-
- lua_pushnil(L);
- } else
- {
- lua_pushvalue(L, -1);
- lua_insert(L, lua_gettop(L) - 2);
- lua_rawset(L, LUA_REGISTRYINDEX);
- }
- }
-
- if (lua_isfunction(L, -1))
- {
- int i = luv_thread_arg_push(L, &work->arg);
- if (lua_pcall(L, i, LUA_MULTRET, 0)) {
- fprintf(stderr, "Uncaught Error in thread: %s\n", lua_tostring(L, -1));
- }
- luv_thread_arg_clear(&work->arg);
- luv_thread_arg_set(L, &work->arg, top + 1, lua_gettop(L), 0);
- lua_settop(L, top);
- } else {
- fprintf(stderr, "Uncaught Error: %s can't be work entry\n",
- lua_typename(L, lua_type(L,-1)));
- }
-}
-
-static void luv_after_work_cb(uv_work_t* req, int status) {
- luv_work_t* work = req->data;
- luv_work_ctx_t* ctx = work->ctx;
- lua_State*L = ctx->L;
- int i;
- (void)status;
- lua_rawgeti(L, LUA_REGISTRYINDEX, ctx->after_work_cb);
- i = luv_thread_arg_push(L, &work->arg);
- if (lua_pcall(L, i, 0, 0))
- {
- fprintf(stderr, "Uncaught Error in thread: %s\n", lua_tostring(L, -1));
- }
-
- //ref down to ctx
- lua_pushlightuserdata(L, work);
- lua_pushnil(L);
- lua_rawset(L, LUA_REGISTRYINDEX);
-
- luv_thread_arg_clear(&work->arg);
- free(work);
-}
-
-static void async_cb(uv_async_t *handle)
-{
- luv_work_t*work = handle->data;
- luv_work_ctx_t* ctx = work->ctx;
- lua_State*L = ctx->L;
- int i;
- lua_rawgeti(L, LUA_REGISTRYINDEX, ctx->async_cb);
- i = luv_thread_arg_push(L, &work->arg);
- if (lua_pcall(L, i, 0, 0))
- {
- fprintf(stderr, "Uncaught Error in thread: %s\n", lua_tostring(L, -1));
- }
-}
-
-static int luv_new_work(lua_State* L) {
- size_t len;
- const char* buff;
- luv_work_ctx_t* ctx;
-
- buff = luv_thread_dumped(L, 1, &len);
- luaL_checktype(L, 2, LUA_TFUNCTION);
- if(!lua_isnoneornil(L, 3))
- luaL_checktype(L, 3, LUA_TFUNCTION);
-
- ctx = lua_newuserdata(L, sizeof(*ctx));
- memset(ctx, 0, sizeof(*ctx));
-
- ctx->len = len;
- ctx->code = malloc(ctx->len);
- memcpy(ctx->code, buff, len);
-
- lua_pushvalue(L, 2);
- ctx->after_work_cb = luaL_ref(L, LUA_REGISTRYINDEX);
- if (lua_gettop(L) == 4) {
- lua_pushvalue(L, 3);
- ctx->async_cb = luaL_ref(L, LUA_REGISTRYINDEX);
- uv_async_init(luv_loop(L), &ctx->async, async_cb);
- } else
- ctx->async_cb = LUA_REFNIL;
- ctx->L = L;
- luaL_getmetatable(L, "luv_work_ctx");
- lua_setmetatable(L, -2);
- return 1;
-}
-
-static int luv_queue_work(lua_State* L) {
- int top = lua_gettop(L);
- luv_work_ctx_t* ctx = luv_check_work_ctx(L, 1);
- luv_work_t* work = malloc(sizeof(*work));
- int ret;
-
- luv_thread_arg_set(L, &work->arg, 2, top, 0);
- work->ctx = ctx;
- work->work.data = work;
- ret = uv_queue_work(luv_loop(L), &work->work, luv_work_cb, luv_after_work_cb);
- if (ret < 0) {
- free(work);
- return luv_error(L, ret);
- }
-
- //ref up to ctx
- lua_pushlightuserdata(L, work);
- lua_pushvalue(L, 1);
- lua_rawset(L, LUA_REGISTRYINDEX);
-
- lua_pushboolean(L, 1);
- return 1;
-}
-
-static const luaL_Reg luv_work_ctx_methods[] = {
- {"queue", luv_queue_work},
- {NULL, NULL}
-};
-
-static int key_inited = 0;
-static void luv_work_init(lua_State* L) {
- luaL_newmetatable(L, "luv_work_ctx");
- lua_pushcfunction(L, luv_work_ctx_tostring);
- lua_setfield(L, -2, "__tostring");
- lua_pushcfunction(L, luv_work_ctx_gc);
- lua_setfield(L, -2, "__gc");
- lua_newtable(L);
- luaL_setfuncs(L, luv_work_ctx_methods, 0);
- lua_setfield(L, -2, "__index");
- lua_pop(L, 1);
-
- if (key_inited==0) {
- key_inited = 1;
- uv_key_create(&L_key);
- }
-}
diff --git a/3rdparty/luv/tests/manual-test-cluster.lua b/3rdparty/luv/tests/manual-test-cluster.lua
deleted file mode 100644
index 304e4be634d..00000000000
--- a/3rdparty/luv/tests/manual-test-cluster.lua
+++ /dev/null
@@ -1,213 +0,0 @@
--- This is quite the involved test. Basically it binds
--- to a tcp port, spawns n children (one per CPU core)
--- who all listen on the same shared port and act as a
--- load balancing cluster.
--- Then N clients are spawned that connect to the cluster
--- The application itself kills the worker upon connection
--- All N workers should accept exactly one request and all close.
-
-return require('lib/tap')(function (test)
-
- -- This function will be run in a child process
- local worker_code = string.dump(function ()
- local dump = require('lib/utils').dump
-
- local function print(...)
- local n = select('#', ...)
- local arguments = {...}
- for i = 1, n do
- arguments[i] = tostring(arguments[i])
- end
-
- local text = table.concat(arguments, "\t")
- text = " " .. string.gsub(text, "\n", "\n ")
- _G.print(text)
- end
-
- local function p(...)
- local n = select('#', ...)
- local arguments = { ... }
-
- for i = 1, n do
- arguments[i] = dump(arguments[i])
- end
-
- print(table.concat(arguments, "\t"))
- end
-
- local uv = require('luv')
- local answer = -1
-
- -- The parent is going to pass us the server handle over a pipe
- -- This will be our local file descriptor at PIPE_FD
- local pipe = uv.new_pipe(true)
- local pipe_fd = tonumber(os.getenv("PIPE_FD"))
- assert(uv.pipe_open(pipe, pipe_fd))
-
- -- Configure the server handle
- local server = uv.new_tcp()
- local done = false
- local function onconnection()
- print("NOT ACCEPTING, already done")
- if done then return end
- local client = uv.new_tcp()
- assert(uv.accept(server, client))
- p("New TCP", client, "on", server)
- p{client=client}
- assert(uv.write(client, "BYE!\n"));
- assert(uv.shutdown(client, function ()
- uv.close(client)
- uv.unref(server)
- done = true
- answer = 42
- end))
- end
-
- -- Read the server handle from the parent
- local function onread(err, data)
- p("onread", {err=err,data=data})
- assert(not err, err)
- if uv.pipe_pending_count(pipe) > 0 then
- local pending_type = uv.pipe_pending_type(pipe)
- p("pending_type", pending_type)
- assert(pending_type == "tcp")
- assert(uv.accept(pipe, server))
- assert(uv.listen(server, 0, onconnection))
- p("Received server handle from parent process", server)
- elseif data then
- p("ondata", data)
- else
- p("onend", data)
- end
- end
- uv.read_start(pipe, onread)
-
- -- Start the event loop!
- uv.run()
-
- os.exit(answer)
- end)
-
- local client_code = string.dump(function ()
- local dump = require('lib/utils').dump
-
- local function print(...)
- local n = select('#', ...)
- local arguments = {...}
- for i = 1, n do
- arguments[i] = tostring(arguments[i])
- end
-
- local text = table.concat(arguments, "\t")
- text = " " .. string.gsub(text, "\n", "\n ")
- _G.print(text)
- end
-
- local function p(...)
- local n = select('#', ...)
- local arguments = { ... }
-
- for i = 1, n do
- arguments[i] = dump(arguments[i])
- end
-
- print(table.concat(arguments, "\t"))
- end
-
- local uv = require('luv')
-
- local host = os.getenv("HOST")
- local port = tonumber(os.getenv("PORT"))
-
- local socket = uv.new_tcp()
-
- assert(uv.tcp_connect(socket, host, port, function (err)
- p("client connected", {err=err})
- assert(not err, err)
- end))
-
- -- Start the event loop!
- uv.run()
- end)
-
- test("tcp cluster", function (print, p, expect, uv)
-
- local exepath = assert(uv.exepath())
- local cpu_count = # assert(uv.cpu_info())
- local left = cpu_count
-
- local server = uv.new_tcp()
- assert(uv.tcp_bind(server, "::1", 0))
-
- local address = uv.tcp_getsockname(server)
- p{server=server,address=address}
-
- print("Master process bound to TCP port " .. address.port .. " on " .. address.ip)
-
- local function spawnWorker()
- local pipe = uv.new_pipe(true)
- local input = uv.new_pipe(false)
- local child, pid
- child, pid = assert(uv.spawn(exepath, {
- cwd = uv.cwd(),
- stdio = {input,1,2,pipe},
- env= {"PIPE_FD=3"}
- }, expect(function (status, signal)
- p("Worker exited", {status=status,signal=signal})
- assert(status == 42, "worker should return 42")
- assert(signal == 0)
- left = left - 1
- uv.close(child)
- uv.close(input)
- uv.close(pipe)
- if left == 0 then
- p("All workers are now dead")
- uv.close(server)
- end
- end)))
- p("Spawned worker", pid, "and sending handle", server)
- assert(uv.write(input, worker_code))
- assert(uv.write2(pipe, "123", server))
- assert(uv.shutdown(input))
- assert(uv.shutdown(pipe))
- end
-
- local function spawnClient()
- local input = uv.new_pipe(false)
- local child, pid
- child, pid = assert(uv.spawn(exepath, {
- stdio = {input,1,2},
- cwd = uv.cwd(),
- env= {
- "HOST=" .. address.ip,
- "PORT=" .. address.port,
- }
- }, expect(function (status, signal)
- p("Client exited", {status=status,signal=signal})
- assert(status == 0)
- assert(signal == 0)
- uv.close(child)
- end, left)))
- p("Spawned client", pid)
- assert(uv.write(input, client_code))
- assert(uv.shutdown(input))
- uv.close(input)
- end
-
- -- Spawn a child process for each CPU core
- for _ = 1, cpu_count do
- spawnWorker()
- end
-
- -- Spawn the clients after a short delay
- local timer = uv.new_timer()
- uv.timer_start(timer, 1000, 0, expect(function ()
- for _ = 1, cpu_count do
- spawnClient()
- end
- uv.close(timer)
- end))
-
- end)
-end)
-
diff --git a/3rdparty/luv/tests/run.lua b/3rdparty/luv/tests/run.lua
deleted file mode 100644
index ea94e9bd58b..00000000000
--- a/3rdparty/luv/tests/run.lua
+++ /dev/null
@@ -1,33 +0,0 @@
--- Run this from the parent directory as
---
--- luajit tests/run.lua
---
-
-local tap = require("lib/tap")
-local uv = require("luv")
-
-local isWindows
-if jit and jit.os then
- -- Luajit provides explicit platform detection
- isWindows = jit.os == "Windows"
-else
- -- Normal lua will only have \ for path separator on windows.
- isWindows = package.config:find("\\") and true or false
-end
-_G.isWindows = isWindows
-
-local req = uv.fs_scandir("tests")
-
-while true do
- local name = uv.fs_scandir_next(req)
- if not name then break end
- local match = string.match(name, "^test%-(.*).lua$")
- if match then
- local path = "tests/test-" .. match
- tap(match)
- require(path)
- end
-end
-
--- run the tests!
-tap(true)
diff --git a/3rdparty/luv/tests/test-async.lua b/3rdparty/luv/tests/test-async.lua
deleted file mode 100644
index 88527cdb88d..00000000000
--- a/3rdparty/luv/tests/test-async.lua
+++ /dev/null
@@ -1,32 +0,0 @@
-return require('lib/tap')(function (test)
-
- test("test pass async between threads", function(p, p, expect, uv)
- local before = os.time()
- local async
- async = uv.new_async(expect(function (a,b,c)
- p('in async notify callback')
- p(a,b,c)
- assert(a=='a')
- assert(b==true)
- assert(c==250)
- uv.close(async)
- end))
- local args = {500, 'string', nil, false, 5, "helloworld",async}
- local unpack = unpack or table.unpack
- uv.new_thread(function(num,s,null,bool,five,hw,asy)
- local uv = require'luv'
- assert(type(num) == "number")
- assert(type(s) == "string")
- assert(null == nil)
- assert(bool == false)
- assert(five == 5)
- assert(hw == 'helloworld')
- assert(type(asy)=='userdata')
- assert(uv.async_send(asy,'a',true,250)==0)
- uv.sleep(1000)
- end, unpack(args)):join()
- local elapsed = (os.time() - before) * 1000
- assert(elapsed >= 1000, "elapsed should be at least delay ")
- end)
-
-end)
diff --git a/3rdparty/luv/tests/test-conversions.lua b/3rdparty/luv/tests/test-conversions.lua
deleted file mode 100644
index f14056ddfb5..00000000000
--- a/3rdparty/luv/tests/test-conversions.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-return require('lib/tap')(function (test)
- test("basic 64bit conversions", function (print, p, expect, uv)
- assert(string.format("%x", 29913653248) == "6f6fe2000")
- assert(string.format("%x", 32207650816) == "77fb9c000")
- end)
-end)
diff --git a/3rdparty/luv/tests/test-dns.lua b/3rdparty/luv/tests/test-dns.lua
deleted file mode 100644
index c24adba7164..00000000000
--- a/3rdparty/luv/tests/test-dns.lua
+++ /dev/null
@@ -1,125 +0,0 @@
-return require('lib/tap')(function (test)
-
- test("Get all local http addresses", function (print, p, expect, uv)
- assert(uv.getaddrinfo(nil, "http", nil, expect(function (err, res)
- p(res, #res)
- assert(not err, err)
- assert(res[1].port == 80)
- end)))
- end)
-
- test("Get all local http addresses sync", function (print, p, expect, uv)
- local res = assert(uv.getaddrinfo(nil, "http"))
- p(res, #res)
- assert(res[1].port == 80)
- end)
-
- test("Get only ipv4 tcp adresses for luvit.io", function (print, p, expect, uv)
- assert(uv.getaddrinfo("luvit.io", nil, {
- socktype = "stream",
- family = "inet",
- }, expect(function (err, res)
- assert(not err, err)
- p(res, #res)
- assert(#res == 1)
- end)))
- end)
-
- -- FIXME: this test always fails on AppVeyor for some reason
- if _G.isWindows and not os.getenv'APPVEYOR' then
- test("Get only ipv6 tcp adresses for luvit.io", function (print, p, expect, uv)
- assert(uv.getaddrinfo("luvit.io", nil, {
- socktype = "stream",
- family = "inet6",
- }, expect(function (err, res)
- assert(not err, err)
- p(res, #res)
- assert(#res == 1)
- end)))
- end)
- end
-
- test("Get ipv4 and ipv6 tcp adresses for luvit.io", function (print, p, expect, uv)
- assert(uv.getaddrinfo("luvit.io", nil, {
- socktype = "stream",
- }, expect(function (err, res)
- assert(not err, err)
- p(res, #res)
- assert(#res > 0)
- end)))
- end)
-
- test("Get all adresses for luvit.io", function (print, p, expect, uv)
- assert(uv.getaddrinfo("luvit.io", nil, nil, expect(function (err, res)
- assert(not err, err)
- p(res, #res)
- assert(#res > 0)
- end)))
- end)
-
- test("Lookup local ipv4 address", function (print, p, expect, uv)
- assert(uv.getnameinfo({
- family = "inet",
- }, expect(function (err, hostname, service)
- p{err=err,hostname=hostname,service=service}
- assert(not err, err)
- assert(hostname)
- assert(service)
- end)))
- end)
-
- test("Lookup local ipv4 address sync", function (print, p, expect, uv)
- local hostname, service = assert(uv.getnameinfo({
- family = "inet",
- }))
- p{hostname=hostname,service=service}
- assert(hostname)
- assert(service)
- end)
-
- test("Lookup local 127.0.0.1 ipv4 address", function (print, p, expect, uv)
- assert(uv.getnameinfo({
- ip = "127.0.0.1",
- }, expect(function (err, hostname, service)
- p{err=err,hostname=hostname,service=service}
- assert(not err, err)
- assert(hostname)
- assert(service)
- end)))
- end)
-
- test("Lookup local ipv6 address", function (print, p, expect, uv)
- assert(uv.getnameinfo({
- family = "inet6",
- }, expect(function (err, hostname, service)
- p{err=err,hostname=hostname,service=service}
- assert(not err, err)
- assert(hostname)
- assert(service)
- end)))
- end)
-
- test("Lookup local ::1 ipv6 address", function (print, p, expect, uv)
- assert(uv.getnameinfo({
- ip = "::1",
- }, expect(function (err, hostname, service)
- p{err=err,hostname=hostname,service=service}
- assert(not err, err)
- assert(hostname)
- assert(service)
- end)))
- end)
-
- test("Lookup local port 80 service", function (print, p, expect, uv)
- assert(uv.getnameinfo({
- port = 80,
- family = "inet6",
- }, expect(function (err, hostname, service)
- p{err=err,hostname=hostname,service=service}
- assert(not err, err)
- assert(hostname)
- assert(service == "http")
- end)))
- end)
-
-end)
diff --git a/3rdparty/luv/tests/test-fs.lua b/3rdparty/luv/tests/test-fs.lua
deleted file mode 100644
index 4bfd67e6578..00000000000
--- a/3rdparty/luv/tests/test-fs.lua
+++ /dev/null
@@ -1,90 +0,0 @@
-return require('lib/tap')(function (test)
-
- test("read a file sync", function (print, p, expect, uv)
- local fd = assert(uv.fs_open('README.md', 'r', tonumber('644', 8)))
- p{fd=fd}
- local stat = assert(uv.fs_fstat(fd))
- p{stat=stat}
- local chunk = assert(uv.fs_read(fd, stat.size, 0))
- assert(#chunk == stat.size)
- assert(uv.fs_close(fd))
- end)
-
- test("read a file async", function (print, p, expect, uv)
- uv.fs_open('README.md', 'r', tonumber('644', 8), expect(function (err, fd)
- assert(not err, err)
- p{fd=fd}
- uv.fs_fstat(fd, expect(function (err, stat)
- assert(not err, err)
- p{stat=stat}
- uv.fs_read(fd, stat.size, 0, expect(function (err, chunk)
- assert(not err, err)
- p{chunk=#chunk}
- assert(#chunk == stat.size)
- uv.fs_close(fd, expect(function (err)
- assert(not err, err)
- end))
- end))
- end))
- end))
- end)
-
- test("fs.write", function (print, p, expect, uv)
- local path = "_test_"
- local fd = assert(uv.fs_open(path, "w", 438))
- uv.fs_write(fd, "Hello World\n", -1)
- uv.fs_write(fd, {"with\n", "more\n", "lines\n"}, -1)
- uv.fs_close(fd)
- uv.fs_unlink(path)
- end)
-
- test("fs.stat sync", function (print, p, expect, uv)
- local stat = assert(uv.fs_stat("README.md"))
- assert(stat.size)
- end)
-
- test("fs.stat async", function (print, p, expect, uv)
- assert(uv.fs_stat("README.md", expect(function (err, stat)
- assert(not err, err)
- assert(stat.size)
- end)))
- end)
-
- test("fs.stat sync error", function (print, p, expect, uv)
- local stat, err, code = uv.fs_stat("BAD_FILE!")
- p{err=err,code=code,stat=stat}
- assert(not stat)
- assert(err)
- assert(code == "ENOENT")
- end)
-
- test("fs.stat async error", function (print, p, expect, uv)
- assert(uv.fs_stat("BAD_FILE@", expect(function (err, stat)
- p{err=err,stat=stat}
- assert(err)
- assert(not stat)
- end)))
- end)
-
- test("fs.scandir", function (print, p, expect, uv)
- local req = uv.fs_scandir('.')
- local function iter()
- return uv.fs_scandir_next(req)
- end
- for name, ftype in iter do
- p{name=name, ftype=ftype}
- assert(name)
- -- ftype is not available in all filesystems; for example it's
- -- provided for HFS+ (OSX), NTFS (Windows) but not for ext4 (Linux).
- end
- end)
-
- test("fs.realpath", function (print, p, expect, uv)
- p(assert(uv.fs_realpath('.')))
- assert(uv.fs_realpath('.', expect(function (err, path)
- assert(not err, err)
- p(path)
- end)))
- end)
-
-end)
diff --git a/3rdparty/luv/tests/test-leaks.lua b/3rdparty/luv/tests/test-leaks.lua
deleted file mode 100644
index 06c6e49a0cf..00000000000
--- a/3rdparty/luv/tests/test-leaks.lua
+++ /dev/null
@@ -1,186 +0,0 @@
-return require('lib/tap')(function (test)
-
- local function bench(uv, p, count, fn)
- collectgarbage()
- local before
- local notify = count / 8
- for i = 1, count do
- fn()
- if i % notify == 0 then
- uv.run()
- collectgarbage()
- local now = uv.resident_set_memory()
- if not before then before = now end
- p(i, now)
- end
- end
- uv.run()
- collectgarbage()
- local after = uv.resident_set_memory()
- p{
- before = before,
- after = after,
- }
- assert(after < before * 1.5)
- end
-
- test("fs-write", function (print, p, expect, uv)
- bench(uv, p, 0x7000, function ()
- local path = "_test_"
- local fd = assert(uv.fs_open(path, "w", 438))
- uv.fs_write(fd, "Hello World\n", -1)
- uv.fs_write(fd, {"with\n", "more\n", "lines\n"}, -1)
- uv.fs_close(fd)
- uv.fs_unlink(path)
- end)
- end)
-
- test("lots-o-timers", function (print, p, expect, uv)
- bench(uv, p, 0x10000, function ()
- local timer = uv.new_timer()
- uv.close(timer)
- end)
- end)
-
- test("lots-o-timers with canceled callbacks", function (print, p, expect, uv)
- bench(uv, p, 0x10000, function ()
- local timer = uv.new_timer()
- uv.timer_start(timer, 100, 100, function ()
- end)
- uv.timer_stop(timer)
- uv.close(timer, function ()
- end)
- uv.run()
- end)
- end)
-
- test("lots-o-timers with real timeouts", function (print, p, expect, uv)
- bench(uv, p, 0x500, function ()
- local timer = uv.new_timer()
- uv.timer_start(timer, 10, 0, expect(function ()
- uv.timer_stop(timer)
- uv.close(timer, function ()
- end)
- end))
- end)
- end)
-
- test("reading file async", function (print, p, expect, uv)
- local mode = tonumber("644", 8)
- bench(uv, p, 0x500, function ()
- local onOpen, onStat, onRead, onClose
- local fd, stat
-
- onOpen = expect(function (err, result)
- assert(not err, err)
- fd = result
- uv.fs_fstat(fd, onStat)
- end)
-
- onStat = expect(function (err, result)
- assert(not err, err)
- stat = result
- uv.fs_read(fd, stat.size, 0, onRead)
- end)
-
- onRead = expect(function (err, data)
- assert(not err, err)
- assert(#data == stat.size)
- uv.fs_close(fd, onClose)
- end)
-
- onClose = expect(function (err)
- assert(not err, err)
- end)
-
- assert(uv.fs_open("README.md", "r", mode, onOpen))
- end)
- end)
-
- test("reading file sync", function (print, p, expect, uv)
- local mode = tonumber("644", 8)
- bench(uv, p, 0x2000, function ()
- local fd = assert(uv.fs_open("README.md", "r", mode))
- local stat = assert(uv.fs_fstat(fd))
- local data = assert(uv.fs_read(fd, stat.size, 0))
- assert(#data == stat.size)
- assert(uv.fs_close(fd))
- end)
- end)
-
- test("invalid file", function (print, p, expect, uv)
- local mode = tonumber("644", 8)
- bench(uv, p, 0x1500, function ()
- local req = uv.fs_open("BAD_FILE", "r", mode, expect(function (err, fd)
- assert(not fd)
- assert(err)
- end))
- end)
- end)
-
- test("invalid file sync", function (print, p, expect, uv)
- local mode = tonumber("644", 8)
- bench(uv, p, 0x20000, function ()
- local fd, err = uv.fs_open("BAD_FILE", "r", mode)
- assert(not fd)
- assert(err)
- end)
- end)
-
- test("invalid spawn args", function (print, p, expect, uv)
- -- Regression test for #73
- bench(uv, p, 0x10000, function ()
- local ret, err = pcall(function ()
- return uv.spawn("ls", {
- args = {"-l", "-h"},
- stdio = {0, 1, 2},
- env = {"EXTRA=true"},
- gid = false, -- Should be integer
- })
- end)
- assert(not ret)
- assert(err)
- end)
- end)
-
- test("stream writing with string and array", function (print, p, expect, uv)
- local port = 0
- local server = uv.new_tcp()
- local data
- local count = 0x800
- server:unref()
- server:bind("127.0.0.1", port)
- server:listen(128, expect(function (err)
- assert(not err, err)
- local client = uv.new_tcp()
- server:accept(client)
- client:write(data)
- client:read_start(expect(function (err, data)
- assert(not err, err)
- assert(data)
- client:close()
- end))
- end, count))
- local address = server:getsockname()
- bench(uv, p, count, function ()
- data = string.rep("Hello", 500)
- local socket = uv.new_tcp()
- socket:connect(address.ip, address.port, expect(function (err)
- assert(not err, err)
- socket:read_start(expect(function (err, chunk)
- assert(not err, err)
- assert(chunk)
- local data = {}
- for i = 0, 100 do
- data[i + 1] = string.rep(string.char(i), 100)
- end
- socket:write(data)
- socket:close()
- end))
- end))
- uv.run()
- end)
- server:close()
- end)
-
-end)
diff --git a/3rdparty/luv/tests/test-misc.lua b/3rdparty/luv/tests/test-misc.lua
deleted file mode 100644
index 72a7b30785e..00000000000
--- a/3rdparty/luv/tests/test-misc.lua
+++ /dev/null
@@ -1,85 +0,0 @@
-return require('lib/tap')(function (test)
-
- test("uv.guess_handle", function (print, p, expect, uv)
- local types = {
- [0] = assert(uv.guess_handle(0)),
- assert(uv.guess_handle(1)),
- assert(uv.guess_handle(2)),
- }
- p("stdio fd types", types)
- end)
-
- test("uv.version and uv.version_string", function (print, p, expect, uv)
- local version = assert(uv.version())
- local version_string = assert(uv.version_string())
- p{version=version, version_string=version_string}
- assert(type(version) == "number")
- assert(type(version_string) == "string")
- end)
-
- test("memory size", function (print, p, expect, uv)
- local rss = uv.resident_set_memory()
- local total = uv.get_total_memory()
- local free = uv.get_free_memory()
- p{rss=rss,total=total,free=free}
- assert(rss < total)
- end)
-
- test("uv.uptime", function (print, p, expect, uv)
- local uptime = assert(uv.uptime())
- p{uptime=uptime}
- end)
-
- test("uv.getrusage", function (print, p, expect, uv)
- local rusage = assert(uv.getrusage())
- p(rusage)
- end)
-
- test("uv.cpu_info", function (print, p, expect, uv)
- local info = assert(uv.cpu_info())
- p(info)
- end)
-
- test("uv.interface_addresses", function (print, p, expect, uv)
- local addresses = assert(uv.interface_addresses())
- for name, info in pairs(addresses) do
- p(name, addresses[name])
- end
- end)
-
- test("uv.loadavg", function (print, p, expect, uv)
- local avg = {assert(uv.loadavg())}
- p(avg)
- assert(#avg == 3)
- end)
-
- test("uv.exepath", function (print, p, expect, uv)
- local path = assert(uv.exepath())
- p(path)
- end)
-
- test("uv.os_homedir", function (print, p, expect, uv)
- local path = assert(uv.os_homedir())
- p(path)
- end)
-
- test("uv.cwd and uv.chdir", function (print, p, expect, uv)
- local old = assert(uv.cwd())
- p(old)
- assert(uv.chdir("/"))
- local cwd = assert(uv.cwd())
- p(cwd)
- assert(cwd ~= old)
- assert(uv.chdir(old))
- end)
-
- test("uv.hrtime", function (print, p, expect, uv)
- local time = assert(uv.hrtime())
- p(time)
- end)
-
- test("test_getpid", function (print, p, expect, uv)
- assert(uv.getpid())
- end)
-
-end)
diff --git a/3rdparty/luv/tests/test-prepare-check-idle-async.lua b/3rdparty/luv/tests/test-prepare-check-idle-async.lua
deleted file mode 100644
index 389c2633efb..00000000000
--- a/3rdparty/luv/tests/test-prepare-check-idle-async.lua
+++ /dev/null
@@ -1,49 +0,0 @@
-return require('lib/tap')(function (test)
-
- test("simple prepare", function (print, p, expect, uv)
- local prepare = uv.new_prepare()
- uv.prepare_start(prepare, expect(function ()
- p("prepare", prepare)
- uv.prepare_stop(prepare)
- uv.close(prepare, expect(function ()
- end))
- end))
- end)
-
- test("simple check", function (print, p, expect, uv)
- local check = uv.new_check()
- uv.check_start(check, expect(function ()
- p("check", check)
- uv.check_stop(check)
- uv.close(check, expect(function ()
- end))
- end))
-
- -- Trigger with a timer
- local timer = uv.new_timer()
- uv.timer_start(timer, 10, 0, expect(function()
- p("timeout", timer)
- uv.timer_stop(timer)
- uv.close(timer)
- end))
- end)
-
- test("simple idle", function (print, p, expect, uv)
- local idle = uv.new_idle()
- uv.idle_start(idle, expect(function ()
- p("idle", idle)
- uv.idle_stop(idle)
- uv.close(idle, expect(function ()
- end))
- end))
- end)
-
- test("simple async", function (print, p, expect, uv)
- local async
- async = uv.new_async(expect(function ()
- uv.close(async)
- end))
- uv.async_send(async)
- end)
-
-end)
diff --git a/3rdparty/luv/tests/test-process.lua b/3rdparty/luv/tests/test-process.lua
deleted file mode 100644
index 4d2b6fbfdab..00000000000
--- a/3rdparty/luv/tests/test-process.lua
+++ /dev/null
@@ -1,101 +0,0 @@
-return require('lib/tap')(function (test)
-
- test("test disable_stdio_inheritance", function (print, p, expect, uv)
- uv.disable_stdio_inheritance()
- end)
-
- test("process stdout", function (print, p, expect, uv)
- local stdout = uv.new_pipe(false)
-
- local handle, pid
- handle, pid = uv.spawn(uv.exepath(), {
- args = {"-e", "print 'Hello World'"},
- stdio = {nil, stdout},
- }, expect(function (code, signal)
- p("exit", {code=code, signal=signal})
- uv.close(handle)
- end))
-
- p{
- handle=handle,
- pid=pid
- }
-
- uv.read_start(stdout, expect(function (err, chunk)
- p("stdout", {err=err,chunk=chunk})
- assert(not err, err)
- uv.close(stdout)
- end))
-
- end)
-
- if _G.isWindows then return end
-
- test("spawn and kill by pid", function (print, p, expect, uv)
- local handle, pid
- handle, pid = uv.spawn("sleep", {
- args = {1},
- }, expect(function (status, signal)
- p("exit", handle, {status=status,signal=signal})
- assert(status == 0)
- assert(signal == 2)
- uv.close(handle)
- end))
- p{handle=handle,pid=pid}
- uv.kill(pid, "sigint")
- end)
-
- test("spawn and kill by handle", function (print, p, expect, uv)
- local handle, pid
- handle, pid = uv.spawn("sleep", {
- args = {1},
- }, expect(function (status, signal)
- p("exit", handle, {status=status,signal=signal})
- assert(status == 0)
- assert(signal == 15)
- uv.close(handle)
- end))
- p{handle=handle,pid=pid}
- uv.process_kill(handle, "sigterm")
- end)
-
- test("invalid command", function (print, p, expect, uv)
- local handle, err
- handle, err = uv.spawn("ksjdfksjdflkjsflksdf", {}, function(exit, code)
- assert(false)
- end)
- assert(handle == nil)
- assert(err)
- end)
-
- test("process stdio", function (print, p, expect, uv)
- local stdin = uv.new_pipe(false)
- local stdout = uv.new_pipe(false)
-
- local handle, pid
- handle, pid = uv.spawn("cat", {
- stdio = {stdin, stdout},
- }, expect(function (code, signal)
- p("exit", {code=code, signal=signal})
- uv.close(handle)
- end))
-
- p{
- handle=handle,
- pid=pid
- }
-
- uv.read_start(stdout, expect(function (err, chunk)
- p("stdout", {err=err,chunk=chunk})
- assert(not err, err)
- uv.close(stdout)
- end))
-
- uv.write(stdin, "Hello World")
- uv.shutdown(stdin, expect(function ()
- uv.close(stdin)
- end))
-
- end)
-
-end)
diff --git a/3rdparty/luv/tests/test-sigchld-after-lua_close.sh b/3rdparty/luv/tests/test-sigchld-after-lua_close.sh
deleted file mode 100644
index e7d22d3df36..00000000000
--- a/3rdparty/luv/tests/test-sigchld-after-lua_close.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-# Verifies that luv will cleanup libuv process handles correctly even if
-# not done by "userspace".
-# Details: https://github.com/luvit/luv/issues/193
-
-# This test modifies one of the examples to skip libuv process cleanup,
-# purposely making it leave SIGCHLD signal handler.
-#
-patch -p1 << "EOF"
-diff --git a/examples/talking-to-children.lua b/examples/talking-to-children.lua
-index 10a53ef..6c6c53f 100644
---- a/examples/talking-to-children.lua
-+++ b/examples/talking-to-children.lua
-@@ -41,7 +41,3 @@ uv.read_start(stdout, onread)
- uv.read_start(stderr, onread)
- uv.write(stdin, "Hello World")
- uv.shutdown(stdin, onshutdown)
--
--uv.run()
--uv.walk(uv.close)
--uv.run()
-EOF
-
-# It also requires a patched lua standalone interpreter that sends SIGCHLD to
-# itself after calling lua_close, which would have freed all memory of the libuv
-# event loop associated with the lua state.
-(
-cd deps/lua
-patch -p1 << "EOF"
-diff --git a/src/lua.c b/src/lua.c
-index 7a47582..4dc19d5 100644
---- a/src/lua.c
-+++ b/src/lua.c
-@@ -608,6 +608,7 @@ int main (int argc, char **argv) {
- result = lua_toboolean(L, -1); /* get result */
- report(L, status);
- lua_close(L);
-+ kill(0, SIGCHLD);
- return (result && status == LUA_OK) ? EXIT_SUCCESS : EXIT_FAILURE;
- }
-EOF
-)
-
-WITH_LUA_ENGINE=Lua make
-./build/lua examples/talking-to-children.lua
diff --git a/3rdparty/luv/tests/test-signal.lua b/3rdparty/luv/tests/test-signal.lua
deleted file mode 100644
index c05db77c888..00000000000
--- a/3rdparty/luv/tests/test-signal.lua
+++ /dev/null
@@ -1,40 +0,0 @@
-local child_code = string.dump(function ()
- local uv = require('luv')
- local signal = uv.new_signal()
- uv.ref(signal)
- uv.signal_start(signal, "sigint", function ()
- uv.unref(signal)
- end)
- uv.run()
- os.exit(7)
-end)
-
-return require('lib/tap')(function (test)
-
- if _G.isWindows then return end
-
- test("Catch SIGINT", function (print, p, expect, uv)
- local child, pid
- local input = uv.new_pipe(false)
- child, pid = assert(uv.spawn(uv.exepath(), {
- args = {"-"},
- -- cwd = uv.cwd(),
- stdio = {input,1,2}
- }, expect(function (code, signal)
- p("exit", {pid=pid,code=code,signal=signal})
- assert(code == 7)
- assert(signal == 0)
- uv.close(input)
- uv.close(child)
- end)))
- uv.write(input, child_code)
- uv.shutdown(input)
- local timer = uv.new_timer()
- uv.timer_start(timer, 200, 0, expect(function ()
- print("Sending child SIGINT")
- uv.process_kill(child, "sigint")
- uv.close(timer)
- end))
- end)
-
-end)
diff --git a/3rdparty/luv/tests/test-tcp.lua b/3rdparty/luv/tests/test-tcp.lua
deleted file mode 100644
index 885d381ebce..00000000000
--- a/3rdparty/luv/tests/test-tcp.lua
+++ /dev/null
@@ -1,114 +0,0 @@
-return require('lib/tap')(function (test)
- test("basic tcp server and client", function (print, p, expect, uv)
- local server = uv.new_tcp()
- uv.tcp_bind(server, "::", 0)
- uv.listen(server, 128, expect(function (err)
- p("server on connection", server)
- assert(not err, err)
- uv.close(server)
- end))
-
- local address = uv.tcp_getsockname(server)
- p{server=server,address=address}
-
- local client = uv.new_tcp()
- local req = uv.tcp_connect(client, "::1", address.port, expect(function (err)
- p("client on connect", client, err)
- assert(not err, err)
- uv.shutdown(client, expect(function (err)
- p("client on shutdown", client, err)
- assert(not err, err)
- uv.close(client, expect(function ()
- p("client on close", client)
- end))
- end))
- end))
- p{client=client,req=req}
- end)
-
- test("tcp echo server and client", function (print, p, expect, uv)
- local server = uv.new_tcp()
- assert(uv.tcp_bind(server, "127.0.0.1", 0))
- assert(uv.listen(server, 1, expect(function ()
- local client = uv.new_tcp()
- assert(uv.accept(server, client))
- assert(uv.read_start(client, expect(function (err, data)
- p("server read", {err=err,data=data})
- assert(not err, err)
- if data then
- assert(uv.write(client, data))
- else
- assert(uv.read_stop(client))
- uv.close(client)
- uv.close(server)
- end
- end, 2)))
- end)))
-
- local address = uv.tcp_getsockname(server)
- p{server=server,address=address}
-
- local socket = assert(uv.new_tcp())
- assert(uv.tcp_connect(socket, "127.0.0.1", address.port, expect(function ()
- assert(uv.read_start(socket, expect(function (err, data)
- p("client read", {err=err,data=data})
- assert(not err, err)
- assert(uv.read_stop(socket))
- uv.close(socket)
- end)))
- local req = assert(uv.write(socket, "Hello", function (err)
- p("client onwrite", socket, err)
- assert(not err, err)
- end))
- p{socket=socket,req=req}
- end)))
- end)
-
- test("tcp echo server and client with methods", function (print, p, expect, uv)
- local server = uv.new_tcp()
- assert(server:bind("127.0.0.1", 0))
- assert(server:listen(1, expect(function ()
- local client = uv.new_tcp()
- assert(server:accept(client))
- assert(client:read_start(expect(function (err, data)
- p("server read", {err=err,data=data})
- assert(not err, err)
- if data then
- assert(client:write(data))
- else
- assert(client:read_stop())
- client:close()
- server:close()
- end
- end, 2)))
- end)))
-
- local address = server:getsockname()
- p{server=server,address=address}
-
- local socket = assert(uv.new_tcp())
- assert(socket:connect("127.0.0.1", address.port, expect(function ()
- assert(socket:read_start(expect(function (err, data)
- p("client read", {err=err,data=data})
- assert(not err, err)
- assert(socket:read_stop())
- socket:close()
- end)))
- local req = assert(socket:write("Hello", function (err)
- p("client onwrite", socket, err)
- assert(not err, err)
- end))
- p{socket=socket,req=req}
- end)))
- end)
-
- test("tcp invalid ip address", function (print, p, expect, uv)
- local ip = '127.0.0.100005'
- local server = uv.new_tcp()
- local status, err = pcall(function() uv.tcp_bind(server, ip, 1000) end)
- assert(not status)
- p(err)
- assert(err:find(ip))
- uv.close(server)
- end)
-end)
diff --git a/3rdparty/luv/tests/test-thread.lua b/3rdparty/luv/tests/test-thread.lua
deleted file mode 100644
index 838b51e4fff..00000000000
--- a/3rdparty/luv/tests/test-thread.lua
+++ /dev/null
@@ -1,47 +0,0 @@
-return require('lib/tap')(function (test)
-
- test("test thread create", function(print, p, expect, uv)
- local delay = 1000
- local before = os.time()
- local thread = uv.new_thread(function(delay)
- require('luv').sleep(delay)
- end,delay)
- uv.thread_join(thread)
- local elapsed = (os.time() - before) * 1000
- p({
- delay = delay,
- elapsed = elapsed
- })
- assert(elapsed >= delay, "elapsed should be at least delay ")
- end)
-
- test("test thread create with arguments", function(print, p, expect, uv)
- local before = os.time()
- local args = {500, 'string', nil, false, 5, "helloworld"}
- local unpack = unpack or table.unpack
- uv.new_thread(function(num,s,null,bool,five,hw)
- assert(type(num) == "number")
- assert(type(s) == "string")
- assert(null == nil)
- assert(bool == false)
- assert(five == 5)
- assert(hw == 'helloworld')
- require('luv').sleep(1000)
- end, unpack(args)):join()
- local elapsed = (os.time() - before) * 1000
- assert(elapsed >= 1000, "elapsed should be at least delay ")
- end)
-
- test("test thread sleep msecs in main thread", function(print, p, expect, uv)
- local delay = 1000
- local before = os.time()
- uv.sleep(delay)
- local elapsed = (os.time() - before) * 1000
- p({
- delay = delay,
- elapsed = elapsed
- })
- assert(elapsed >= delay, "elapsed should be at least delay ")
- end)
-
-end)
diff --git a/3rdparty/luv/tests/test-timer.lua b/3rdparty/luv/tests/test-timer.lua
deleted file mode 100644
index f9eb9d89c5f..00000000000
--- a/3rdparty/luv/tests/test-timer.lua
+++ /dev/null
@@ -1,87 +0,0 @@
-return require('lib/tap')(function (test)
-
- -- This tests using timers for a simple timeout.
- -- It also tests the handle close callback and
- test("simple timeout", function (print, p, expect, uv)
- local timer = uv.new_timer()
- local function onclose()
- p("closed", timer)
- end
- local function ontimeout()
- p("timeout", timer)
- uv.close(timer, expect(onclose))
- end
- uv.timer_start(timer, 10, 0, expect(ontimeout))
- end)
-
- -- This is like the previous test, but using repeat.
- test("simple interval", function (print, p, expect, uv)
- local timer = uv.new_timer()
- local count = 3
- local onclose = expect(function ()
- p("closed", timer)
- end)
- local function oninterval()
- p("interval", timer)
- count = count - 1
- if count == 0 then
- uv.close(timer, onclose)
- end
- end
- uv.timer_start(timer, 10, 10, oninterval)
- end)
-
- -- Test two concurrent timers
- -- There is a small race condition, but there are 100ms of wiggle room.
- -- 400ms is halfway between 100+200ms and 100+400ms
- test("timeout with interval", function (print, p, expect, uv)
- local a = uv.new_timer()
- local b = uv.new_timer()
- uv.timer_start(a, 400, 0, expect(function ()
- p("timeout", a)
- uv.timer_stop(b)
- uv.close(a)
- uv.close(b)
- end))
- uv.timer_start(b, 100, 200, expect(function ()
- p("interval", b)
- end, 2))
- end)
-
- -- This advanced test uses the rest of the uv_timer_t functions
- -- to create an interval that shrinks over time.
- test("shrinking interval", function (print, p, expect, uv)
- local timer = uv.new_timer()
- uv.timer_start(timer, 10, 0, expect(function ()
- local r = uv.timer_get_repeat(timer)
- p("interval", timer, r)
- if r == 0 then
- uv.timer_set_repeat(timer, 8)
- uv.timer_again(timer)
- elseif r == 2 then
- uv.timer_stop(timer)
- uv.close(timer)
- else
- uv.timer_set_repeat(timer, r / 2)
- end
- end, 4))
- end)
-
- test("shrinking interval using methods", function (print, p, expect, uv)
- local timer = uv.new_timer()
- timer:start(10, 0, expect(function ()
- local r = timer:get_repeat()
- p("interval", timer, r)
- if r == 0 then
- timer:set_repeat(8)
- timer:again()
- elseif r == 2 then
- timer:stop()
- timer:close()
- else
- timer:set_repeat(r / 2)
- end
- end, 4))
- end)
-
-end)
diff --git a/3rdparty/luv/tests/test-work.lua b/3rdparty/luv/tests/test-work.lua
deleted file mode 100644
index 3a98b15e6bc..00000000000
--- a/3rdparty/luv/tests/test-work.lua
+++ /dev/null
@@ -1,48 +0,0 @@
-return require('lib/tap')(function (test)
- test("test threadpool", function(print,p,expect,_uv)
- p('Please be patient, the test cost a lots of time')
- local count = 1000 --for memleaks dected
- local step = 0
- local ctx
- ctx = _uv.new_work(
- function(n,s) --work,in threadpool
- local uv = require('luv')
- local t = uv.thread_self()
- uv.sleep(100)
- return n,n*n, tostring(uv.thread_self()),s
- end,
- function(n,r,id, s)
- assert(n*n==r)
- if step < count then
- _uv.queue_work(ctx,n,s)
- step = step + 1
- if (step % 100==0) then
- p(string.format('run %d%%', math.floor(step*100/count)))
- end
- end
- end --after work, in loop thread
- )
- local ls = string.rep('-',4096)
-
- _uv.queue_work(ctx,2,ls)
- _uv.queue_work(ctx,4,ls)
- _uv.queue_work(ctx,6,ls)
- _uv.queue_work(ctx,-2,ls)
- _uv.queue_work(ctx,-11,ls)
- _uv.queue_work(ctx,2,ls)
- _uv.queue_work(ctx,4,ls)
- _uv.queue_work(ctx,6,ls)
- _uv.queue_work(ctx,-2,ls)
- _uv.queue_work(ctx,-11,ls)
- _uv.queue_work(ctx,2,ls)
- _uv.queue_work(ctx,4,ls)
- _uv.queue_work(ctx,6,ls)
- _uv.queue_work(ctx,-2,ls)
- _uv.queue_work(ctx,-11,ls)
- _uv.queue_work(ctx,2,ls)
- _uv.queue_work(ctx,4,ls)
- _uv.queue_work(ctx,6,ls)
- _uv.queue_work(ctx,-2,ls)
- _uv.queue_work(ctx,-11,ls)
- end)
-end)
diff --git a/3rdparty/win81sdk/Include/um/xaudio2.h b/3rdparty/win81sdk/Include/um/xaudio2.h
deleted file mode 100644
index e44c6a0f163..00000000000
--- a/3rdparty/win81sdk/Include/um/xaudio2.h
+++ /dev/null
@@ -1,1196 +0,0 @@
-/**************************************************************************
- *
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *
- * File: xaudio2.h
- * Content: Declarations for the XAudio2 game audio API.
- *
- **************************************************************************/
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#ifndef __XAUDIO2_INCLUDED__
-#define __XAUDIO2_INCLUDED__
-
-#include <sdkddkver.h>
-
-#if(_WIN32_WINNT < _WIN32_WINNT_WIN8)
-#error "This version of XAudio2 is available only in Windows 8 or later. Use the XAudio2 headers and libraries from the DirectX SDK with applications that target Windows 7 and earlier versions."
-#endif // (_WIN32_WINNT < _WIN32_WINNT_WIN8)
-
-#include <winapifamily.h>
-
-#pragma region Application Family
-#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
-
-// Current name of the DLL shipped in the same SDK as this header.
-// The name reflects the current version
-#define XAUDIO2_DLL_A "xaudio2_8.dll"
-#define XAUDIO2_DLL_W L"xaudio2_8.dll"
-
-#ifdef UNICODE
- #define XAUDIO2_DLL XAUDIO2_DLL_W
-#else
- #define XAUDIO2_DLL XAUDIO2_DLL_A
-#endif
-
-
-/**************************************************************************
- *
- * XAudio2 COM object class and interface IDs.
- *
- **************************************************************************/
-
-#include <basetyps.h>
-
-// XAudio 2.8
-interface __declspec(uuid("60d8dac8-5aa1-4e8e-b597-2f5e2883d484")) IXAudio2;
-
-// Ignore the rest of this header if only the GUID definitions were requested
-#ifndef GUID_DEFS_ONLY
-
-#include <objbase.h> // Windows COM declarations
-
-#include <sal.h> // Markers for documenting API semantics
-#include <mmreg.h> // Basic data types and constants for audio work
-#include <audiosessiontypes.h> // For AUDIO_STREAM_CATEGORY
-
-// All structures defined in this file use tight field packing
-#pragma pack(push, 1)
-
-
-/**************************************************************************
- *
- * XAudio2 constants, flags and error codes.
- *
- **************************************************************************/
-
-// Numeric boundary values
-#define XAUDIO2_MAX_BUFFER_BYTES 0x80000000 // Maximum bytes allowed in a source buffer
-#define XAUDIO2_MAX_QUEUED_BUFFERS 64 // Maximum buffers allowed in a voice queue
-#define XAUDIO2_MAX_BUFFERS_SYSTEM 2 // Maximum buffers allowed for system threads (Xbox 360 only)
-#define XAUDIO2_MAX_AUDIO_CHANNELS 64 // Maximum channels in an audio stream
-#define XAUDIO2_MIN_SAMPLE_RATE 1000 // Minimum audio sample rate supported
-#define XAUDIO2_MAX_SAMPLE_RATE 200000 // Maximum audio sample rate supported
-#define XAUDIO2_MAX_VOLUME_LEVEL 16777216.0f // Maximum acceptable volume level (2^24)
-#define XAUDIO2_MIN_FREQ_RATIO (1/1024.0f) // Minimum SetFrequencyRatio argument
-#define XAUDIO2_MAX_FREQ_RATIO 1024.0f // Maximum MaxFrequencyRatio argument
-#define XAUDIO2_DEFAULT_FREQ_RATIO 2.0f // Default MaxFrequencyRatio argument
-#define XAUDIO2_MAX_FILTER_ONEOVERQ 1.5f // Maximum XAUDIO2_FILTER_PARAMETERS.OneOverQ
-#define XAUDIO2_MAX_FILTER_FREQUENCY 1.0f // Maximum XAUDIO2_FILTER_PARAMETERS.Frequency
-#define XAUDIO2_MAX_LOOP_COUNT 254 // Maximum non-infinite XAUDIO2_BUFFER.LoopCount
-#define XAUDIO2_MAX_INSTANCES 8 // Maximum simultaneous XAudio2 objects on Xbox 360
-
-// For XMA voices on Xbox 360 there is an additional restriction on the MaxFrequencyRatio
-// argument and the voice's sample rate: the product of these numbers cannot exceed 600000
-// for one-channel voices or 300000 for voices with more than one channel.
-#define XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO 600000
-#define XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL 300000
-
-// Numeric values with special meanings
-#define XAUDIO2_COMMIT_NOW 0 // Used as an OperationSet argument
-#define XAUDIO2_COMMIT_ALL 0 // Used in IXAudio2::CommitChanges
-#define XAUDIO2_INVALID_OPSET (UINT32)(-1) // Not allowed for OperationSet arguments
-#define XAUDIO2_NO_LOOP_REGION 0 // Used in XAUDIO2_BUFFER.LoopCount
-#define XAUDIO2_LOOP_INFINITE 255 // Used in XAUDIO2_BUFFER.LoopCount
-#define XAUDIO2_DEFAULT_CHANNELS 0 // Used in CreateMasteringVoice
-#define XAUDIO2_DEFAULT_SAMPLERATE 0 // Used in CreateMasteringVoice
-
-// Flags
-#define XAUDIO2_VOICE_NOPITCH 0x0002 // Used in IXAudio2::CreateSourceVoice
-#define XAUDIO2_VOICE_NOSRC 0x0004 // Used in IXAudio2::CreateSourceVoice
-#define XAUDIO2_VOICE_USEFILTER 0x0008 // Used in IXAudio2::CreateSource/SubmixVoice
-#define XAUDIO2_PLAY_TAILS 0x0020 // Used in IXAudio2SourceVoice::Stop
-#define XAUDIO2_END_OF_STREAM 0x0040 // Used in XAUDIO2_BUFFER.Flags
-#define XAUDIO2_SEND_USEFILTER 0x0080 // Used in XAUDIO2_SEND_DESCRIPTOR.Flags
-#define XAUDIO2_VOICE_NOSAMPLESPLAYED 0x0100 // Used in IXAudio2SourceVoice::GetState
-
-// Default parameters for the built-in filter
-#define XAUDIO2_DEFAULT_FILTER_TYPE LowPassFilter
-#define XAUDIO2_DEFAULT_FILTER_FREQUENCY XAUDIO2_MAX_FILTER_FREQUENCY
-#define XAUDIO2_DEFAULT_FILTER_ONEOVERQ 1.0f
-
-// Internal XAudio2 constants
-#define XAUDIO2_QUANTUM_NUMERATOR 1 // On Windows, XAudio2 processes audio
-#define XAUDIO2_QUANTUM_DENOMINATOR 100 // in 10ms chunks (= 1/100 seconds)
-#define XAUDIO2_QUANTUM_MS (1000.0f * XAUDIO2_QUANTUM_NUMERATOR / XAUDIO2_QUANTUM_DENOMINATOR)
-
-// XAudio2 error codes
-#define FACILITY_XAUDIO2 0x896
-#define XAUDIO2_E_INVALID_CALL 0x88960001 // An API call or one of its arguments was illegal
-#define XAUDIO2_E_XMA_DECODER_ERROR 0x88960002 // The XMA hardware suffered an unrecoverable error
-#define XAUDIO2_E_XAPO_CREATION_FAILED 0x88960003 // XAudio2 failed to initialize an XAPO effect
-#define XAUDIO2_E_DEVICE_INVALIDATED 0x88960004 // An audio device became unusable (unplugged, etc)
-
-
-/**************************************************************************
- *
- * Forward declarations for the XAudio2 interfaces.
- *
- **************************************************************************/
-
-#ifdef __cplusplus
- #define FWD_DECLARE(x) interface x
-#else
- #define FWD_DECLARE(x) typedef interface x x
-#endif
-
-FWD_DECLARE(IXAudio2);
-FWD_DECLARE(IXAudio2Voice);
-FWD_DECLARE(IXAudio2SourceVoice);
-FWD_DECLARE(IXAudio2SubmixVoice);
-FWD_DECLARE(IXAudio2MasteringVoice);
-FWD_DECLARE(IXAudio2EngineCallback);
-FWD_DECLARE(IXAudio2VoiceCallback);
-
-
-/**************************************************************************
- *
- * XAudio2 structures and enumerations.
- *
- **************************************************************************/
-
-// Used in XAudio2Create, specifies which CPU(s) to use.
-typedef UINT32 XAUDIO2_PROCESSOR;
-#define Processor1 0x00000001
-#define Processor2 0x00000002
-#define Processor3 0x00000004
-#define Processor4 0x00000008
-#define Processor5 0x00000010
-#define Processor6 0x00000020
-#define Processor7 0x00000040
-#define Processor8 0x00000080
-#define Processor9 0x00000100
-#define Processor10 0x00000200
-#define Processor11 0x00000400
-#define Processor12 0x00000800
-#define Processor13 0x00001000
-#define Processor14 0x00002000
-#define Processor15 0x00004000
-#define Processor16 0x00008000
-#define Processor17 0x00010000
-#define Processor18 0x00020000
-#define Processor19 0x00040000
-#define Processor20 0x00080000
-#define Processor21 0x00100000
-#define Processor22 0x00200000
-#define Processor23 0x00400000
-#define Processor24 0x00800000
-#define Processor25 0x01000000
-#define Processor26 0x02000000
-#define Processor27 0x04000000
-#define Processor28 0x08000000
-#define Processor29 0x10000000
-#define Processor30 0x20000000
-#define Processor31 0x40000000
-#define Processor32 0x80000000
-#define XAUDIO2_ANY_PROCESSOR 0xffffffff
-#define XAUDIO2_DEFAULT_PROCESSOR Processor1
-
-// Returned by IXAudio2Voice::GetVoiceDetails
-typedef struct XAUDIO2_VOICE_DETAILS
-{
- UINT32 CreationFlags; // Flags the voice was created with.
- UINT32 ActiveFlags; // Flags currently active.
- UINT32 InputChannels; // Channels in the voice's input audio.
- UINT32 InputSampleRate; // Sample rate of the voice's input audio.
-} XAUDIO2_VOICE_DETAILS;
-
-// Used in XAUDIO2_VOICE_SENDS below
-typedef struct XAUDIO2_SEND_DESCRIPTOR
-{
- UINT32 Flags; // Either 0 or XAUDIO2_SEND_USEFILTER.
- IXAudio2Voice* pOutputVoice; // This send's destination voice.
-} XAUDIO2_SEND_DESCRIPTOR;
-
-// Used in the voice creation functions and in IXAudio2Voice::SetOutputVoices
-typedef struct XAUDIO2_VOICE_SENDS
-{
- UINT32 SendCount; // Number of sends from this voice.
- XAUDIO2_SEND_DESCRIPTOR* pSends; // Array of SendCount send descriptors.
-} XAUDIO2_VOICE_SENDS;
-
-// Used in XAUDIO2_EFFECT_CHAIN below
-typedef struct XAUDIO2_EFFECT_DESCRIPTOR
-{
- IUnknown* pEffect; // Pointer to the effect object's IUnknown interface.
- BOOL InitialState; // TRUE if the effect should begin in the enabled state.
- UINT32 OutputChannels; // How many output channels the effect should produce.
-} XAUDIO2_EFFECT_DESCRIPTOR;
-
-// Used in the voice creation functions and in IXAudio2Voice::SetEffectChain
-typedef struct XAUDIO2_EFFECT_CHAIN
-{
- UINT32 EffectCount; // Number of effects in this voice's effect chain.
- XAUDIO2_EFFECT_DESCRIPTOR* pEffectDescriptors; // Array of effect descriptors.
-} XAUDIO2_EFFECT_CHAIN;
-
-// Used in XAUDIO2_FILTER_PARAMETERS below
-typedef enum XAUDIO2_FILTER_TYPE
-{
- LowPassFilter, // Attenuates frequencies above the cutoff frequency (state-variable filter).
- BandPassFilter, // Attenuates frequencies outside a given range (state-variable filter).
- HighPassFilter, // Attenuates frequencies below the cutoff frequency (state-variable filter).
- NotchFilter, // Attenuates frequencies inside a given range (state-variable filter).
- LowPassOnePoleFilter, // Attenuates frequencies above the cutoff frequency (one-pole filter, XAUDIO2_FILTER_PARAMETERS.OneOverQ has no effect)
- HighPassOnePoleFilter // Attenuates frequencies below the cutoff frequency (one-pole filter, XAUDIO2_FILTER_PARAMETERS.OneOverQ has no effect)
-} XAUDIO2_FILTER_TYPE;
-
-// Used in IXAudio2Voice::Set/GetFilterParameters and Set/GetOutputFilterParameters
-typedef struct XAUDIO2_FILTER_PARAMETERS
-{
- XAUDIO2_FILTER_TYPE Type; // Filter type.
- float Frequency; // Filter coefficient.
- // must be >= 0 and <= XAUDIO2_MAX_FILTER_FREQUENCY
- // See XAudio2CutoffFrequencyToRadians() for state-variable filter types and
- // XAudio2CutoffFrequencyToOnePoleCoefficient() for one-pole filter types.
- float OneOverQ; // Reciprocal of the filter's quality factor Q;
- // must be > 0 and <= XAUDIO2_MAX_FILTER_ONEOVERQ.
- // Has no effect for one-pole filters.
-} XAUDIO2_FILTER_PARAMETERS;
-
-// Used in IXAudio2SourceVoice::SubmitSourceBuffer
-typedef struct XAUDIO2_BUFFER
-{
- UINT32 Flags; // Either 0 or XAUDIO2_END_OF_STREAM.
- UINT32 AudioBytes; // Size of the audio data buffer in bytes.
- const BYTE* pAudioData; // Pointer to the audio data buffer.
- UINT32 PlayBegin; // First sample in this buffer to be played.
- UINT32 PlayLength; // Length of the region to be played in samples,
- // or 0 to play the whole buffer.
- UINT32 LoopBegin; // First sample of the region to be looped.
- UINT32 LoopLength; // Length of the desired loop region in samples,
- // or 0 to loop the entire buffer.
- UINT32 LoopCount; // Number of times to repeat the loop region,
- // or XAUDIO2_LOOP_INFINITE to loop forever.
- void* pContext; // Context value to be passed back in callbacks.
-} XAUDIO2_BUFFER;
-
-// Used in IXAudio2SourceVoice::SubmitSourceBuffer when submitting XWMA data.
-// NOTE: If an XWMA sound is submitted in more than one buffer, each buffer's
-// pDecodedPacketCumulativeBytes[PacketCount-1] value must be subtracted from
-// all the entries in the next buffer's pDecodedPacketCumulativeBytes array.
-// And whether a sound is submitted in more than one buffer or not, the final
-// buffer of the sound should use the XAUDIO2_END_OF_STREAM flag, or else the
-// client must call IXAudio2SourceVoice::Discontinuity after submitting it.
-typedef struct XAUDIO2_BUFFER_WMA
-{
- const UINT32* pDecodedPacketCumulativeBytes; // Decoded packet's cumulative size array.
- // Each element is the number of bytes accumulated
- // when the corresponding XWMA packet is decoded in
- // order. The array must have PacketCount elements.
- UINT32 PacketCount; // Number of XWMA packets submitted. Must be >= 1 and
- // divide evenly into XAUDIO2_BUFFER.AudioBytes.
-} XAUDIO2_BUFFER_WMA;
-
-// Returned by IXAudio2SourceVoice::GetState
-typedef struct XAUDIO2_VOICE_STATE
-{
- void* pCurrentBufferContext; // The pContext value provided in the XAUDIO2_BUFFER
- // that is currently being processed, or NULL if
- // there are no buffers in the queue.
- UINT32 BuffersQueued; // Number of buffers currently queued on the voice
- // (including the one that is being processed).
- UINT64 SamplesPlayed; // Total number of samples produced by the voice since
- // it began processing the current audio stream.
- // If XAUDIO2_VOICE_NOSAMPLESPLAYED is specified
- // in the call to IXAudio2SourceVoice::GetState,
- // this member will not be calculated, saving CPU.
-} XAUDIO2_VOICE_STATE;
-
-// Returned by IXAudio2::GetPerformanceData
-typedef struct XAUDIO2_PERFORMANCE_DATA
-{
- // CPU usage information
- UINT64 AudioCyclesSinceLastQuery; // CPU cycles spent on audio processing since the
- // last call to StartEngine or GetPerformanceData.
- UINT64 TotalCyclesSinceLastQuery; // Total CPU cycles elapsed since the last call
- // (only counts the CPU XAudio2 is running on).
- UINT32 MinimumCyclesPerQuantum; // Fewest CPU cycles spent processing any one
- // audio quantum since the last call.
- UINT32 MaximumCyclesPerQuantum; // Most CPU cycles spent processing any one
- // audio quantum since the last call.
-
- // Memory usage information
- UINT32 MemoryUsageInBytes; // Total heap space currently in use.
-
- // Audio latency and glitching information
- UINT32 CurrentLatencyInSamples; // Minimum delay from when a sample is read from a
- // source buffer to when it reaches the speakers.
- UINT32 GlitchesSinceEngineStarted; // Audio dropouts since the engine was started.
-
- // Data about XAudio2's current workload
- UINT32 ActiveSourceVoiceCount; // Source voices currently playing.
- UINT32 TotalSourceVoiceCount; // Source voices currently existing.
- UINT32 ActiveSubmixVoiceCount; // Submix voices currently playing/existing.
-
- UINT32 ActiveResamplerCount; // Resample xAPOs currently active.
- UINT32 ActiveMatrixMixCount; // MatrixMix xAPOs currently active.
-
- // Usage of the hardware XMA decoder (Xbox 360 only)
- UINT32 ActiveXmaSourceVoices; // Number of source voices decoding XMA data.
- UINT32 ActiveXmaStreams; // A voice can use more than one XMA stream.
-} XAUDIO2_PERFORMANCE_DATA;
-
-// Used in IXAudio2::SetDebugConfiguration
-typedef struct XAUDIO2_DEBUG_CONFIGURATION
-{
- UINT32 TraceMask; // Bitmap of enabled debug message types.
- UINT32 BreakMask; // Message types that will break into the debugger.
- BOOL LogThreadID; // Whether to log the thread ID with each message.
- BOOL LogFileline; // Whether to log the source file and line number.
- BOOL LogFunctionName; // Whether to log the function name.
- BOOL LogTiming; // Whether to log message timestamps.
-} XAUDIO2_DEBUG_CONFIGURATION;
-
-// Values for the TraceMask and BreakMask bitmaps. Only ERRORS and WARNINGS
-// are valid in BreakMask. WARNINGS implies ERRORS, DETAIL implies INFO, and
-// FUNC_CALLS implies API_CALLS. By default, TraceMask is ERRORS and WARNINGS
-// and all the other settings are zero.
-#define XAUDIO2_LOG_ERRORS 0x0001 // For handled errors with serious effects.
-#define XAUDIO2_LOG_WARNINGS 0x0002 // For handled errors that may be recoverable.
-#define XAUDIO2_LOG_INFO 0x0004 // Informational chit-chat (e.g. state changes).
-#define XAUDIO2_LOG_DETAIL 0x0008 // More detailed chit-chat.
-#define XAUDIO2_LOG_API_CALLS 0x0010 // Public API function entries and exits.
-#define XAUDIO2_LOG_FUNC_CALLS 0x0020 // Internal function entries and exits.
-#define XAUDIO2_LOG_TIMING 0x0040 // Delays detected and other timing data.
-#define XAUDIO2_LOG_LOCKS 0x0080 // Usage of critical sections and mutexes.
-#define XAUDIO2_LOG_MEMORY 0x0100 // Memory heap usage information.
-#define XAUDIO2_LOG_STREAMING 0x1000 // Audio streaming information.
-
-
-/**************************************************************************
- *
- * IXAudio2: Top-level XAudio2 COM interface.
- *
- **************************************************************************/
-
-// Use default arguments if compiling as C++
-#ifdef __cplusplus
- #define X2DEFAULT(x) =x
-#else
- #define X2DEFAULT(x)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IXAudio2
-DECLARE_INTERFACE_(IXAudio2, IUnknown)
-{
- // NAME: IXAudio2::QueryInterface
- // DESCRIPTION: Queries for a given COM interface on the XAudio2 object.
- // Only IID_IUnknown and IID_IXAudio2 are supported.
- //
- // ARGUMENTS:
- // riid - IID of the interface to be obtained.
- // ppvInterface - Returns a pointer to the requested interface.
- //
- STDMETHOD(QueryInterface) (THIS_ REFIID riid, _Outptr_ void** ppvInterface) PURE;
-
- // NAME: IXAudio2::AddRef
- // DESCRIPTION: Adds a reference to the XAudio2 object.
- //
- STDMETHOD_(ULONG, AddRef) (THIS) PURE;
-
- // NAME: IXAudio2::Release
- // DESCRIPTION: Releases a reference to the XAudio2 object.
- //
- STDMETHOD_(ULONG, Release) (THIS) PURE;
-
- // NAME: IXAudio2::RegisterForCallbacks
- // DESCRIPTION: Adds a new client to receive XAudio2's engine callbacks.
- //
- // ARGUMENTS:
- // pCallback - Callback interface to be called during each processing pass.
- //
- STDMETHOD(RegisterForCallbacks) (_In_ IXAudio2EngineCallback* pCallback) PURE;
-
- // NAME: IXAudio2::UnregisterForCallbacks
- // DESCRIPTION: Removes an existing receiver of XAudio2 engine callbacks.
- //
- // ARGUMENTS:
- // pCallback - Previously registered callback interface to be removed.
- //
- STDMETHOD_(void, UnregisterForCallbacks) (_In_ IXAudio2EngineCallback* pCallback) PURE;
-
- // NAME: IXAudio2::CreateSourceVoice
- // DESCRIPTION: Creates and configures a source voice.
- //
- // ARGUMENTS:
- // ppSourceVoice - Returns the new object's IXAudio2SourceVoice interface.
- // pSourceFormat - Format of the audio that will be fed to the voice.
- // Flags - XAUDIO2_VOICE flags specifying the source voice's behavior.
- // MaxFrequencyRatio - Maximum SetFrequencyRatio argument to be allowed.
- // pCallback - Optional pointer to a client-provided callback interface.
- // pSendList - Optional list of voices this voice should send audio to.
- // pEffectChain - Optional list of effects to apply to the audio data.
- //
- STDMETHOD(CreateSourceVoice) (THIS_ _Outptr_ IXAudio2SourceVoice** ppSourceVoice,
- _In_ const WAVEFORMATEX* pSourceFormat,
- UINT32 Flags X2DEFAULT(0),
- float MaxFrequencyRatio X2DEFAULT(XAUDIO2_DEFAULT_FREQ_RATIO),
- _In_opt_ IXAudio2VoiceCallback* pCallback X2DEFAULT(NULL),
- _In_opt_ const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL),
- _In_opt_ const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
-
- // NAME: IXAudio2::CreateSubmixVoice
- // DESCRIPTION: Creates and configures a submix voice.
- //
- // ARGUMENTS:
- // ppSubmixVoice - Returns the new object's IXAudio2SubmixVoice interface.
- // InputChannels - Number of channels in this voice's input audio data.
- // InputSampleRate - Sample rate of this voice's input audio data.
- // Flags - XAUDIO2_VOICE flags specifying the submix voice's behavior.
- // ProcessingStage - Arbitrary number that determines the processing order.
- // pSendList - Optional list of voices this voice should send audio to.
- // pEffectChain - Optional list of effects to apply to the audio data.
- //
- STDMETHOD(CreateSubmixVoice) (THIS_ _Outptr_ IXAudio2SubmixVoice** ppSubmixVoice,
- UINT32 InputChannels, UINT32 InputSampleRate,
- UINT32 Flags X2DEFAULT(0), UINT32 ProcessingStage X2DEFAULT(0),
- _In_opt_ const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL),
- _In_opt_ const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
-
-
- // NAME: IXAudio2::CreateMasteringVoice
- // DESCRIPTION: Creates and configures a mastering voice.
- //
- // ARGUMENTS:
- // ppMasteringVoice - Returns the new object's IXAudio2MasteringVoice interface.
- // InputChannels - Number of channels in this voice's input audio data.
- // InputSampleRate - Sample rate of this voice's input audio data.
- // Flags - XAUDIO2_VOICE flags specifying the mastering voice's behavior.
- // szDeviceId - Identifier of the device to receive the output audio.
- // pEffectChain - Optional list of effects to apply to the audio data.
- // StreamCategory - The audio stream category to use for this mastering voice
- //
- STDMETHOD(CreateMasteringVoice) (THIS_ _Outptr_ IXAudio2MasteringVoice** ppMasteringVoice,
- UINT32 InputChannels X2DEFAULT(XAUDIO2_DEFAULT_CHANNELS),
- UINT32 InputSampleRate X2DEFAULT(XAUDIO2_DEFAULT_SAMPLERATE),
- UINT32 Flags X2DEFAULT(0), _In_opt_z_ LPCWSTR szDeviceId X2DEFAULT(NULL),
- _In_opt_ const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL),
- _In_ AUDIO_STREAM_CATEGORY StreamCategory X2DEFAULT(AudioCategory_GameEffects)) PURE;
-
- // NAME: IXAudio2::StartEngine
- // DESCRIPTION: Creates and starts the audio processing thread.
- //
- STDMETHOD(StartEngine) (THIS) PURE;
-
- // NAME: IXAudio2::StopEngine
- // DESCRIPTION: Stops and destroys the audio processing thread.
- //
- STDMETHOD_(void, StopEngine) (THIS) PURE;
-
- // NAME: IXAudio2::CommitChanges
- // DESCRIPTION: Atomically applies a set of operations previously tagged
- // with a given identifier.
- //
- // ARGUMENTS:
- // OperationSet - Identifier of the set of operations to be applied.
- //
- STDMETHOD(CommitChanges) (THIS_ UINT32 OperationSet) PURE;
-
- // NAME: IXAudio2::GetPerformanceData
- // DESCRIPTION: Returns current resource usage details: memory, CPU, etc.
- //
- // ARGUMENTS:
- // pPerfData - Returns the performance data structure.
- //
- STDMETHOD_(void, GetPerformanceData) (THIS_ _Out_ XAUDIO2_PERFORMANCE_DATA* pPerfData) PURE;
-
- // NAME: IXAudio2::SetDebugConfiguration
- // DESCRIPTION: Configures XAudio2's debug output (in debug builds only).
- //
- // ARGUMENTS:
- // pDebugConfiguration - Structure describing the debug output behavior.
- // pReserved - Optional parameter; must be NULL.
- //
- STDMETHOD_(void, SetDebugConfiguration) (THIS_ _In_opt_ const XAUDIO2_DEBUG_CONFIGURATION* pDebugConfiguration,
- _Reserved_ void* pReserved X2DEFAULT(NULL)) PURE;
-};
-
-
-/**************************************************************************
- *
- * IXAudio2Voice: Base voice management interface.
- *
- **************************************************************************/
-
-#undef INTERFACE
-#define INTERFACE IXAudio2Voice
-DECLARE_INTERFACE(IXAudio2Voice)
-{
- // These methods are declared in a macro so that the same declarations
- // can be used in the derived voice types (IXAudio2SourceVoice, etc).
-
- #define Declare_IXAudio2Voice_Methods() \
- \
- /* NAME: IXAudio2Voice::GetVoiceDetails
- // DESCRIPTION: Returns the basic characteristics of this voice.
- //
- // ARGUMENTS:
- // pVoiceDetails - Returns the voice's details.
- */\
- STDMETHOD_(void, GetVoiceDetails) (THIS_ _Out_ XAUDIO2_VOICE_DETAILS* pVoiceDetails) PURE; \
- \
- /* NAME: IXAudio2Voice::SetOutputVoices
- // DESCRIPTION: Replaces the set of submix/mastering voices that receive
- // this voice's output.
- //
- // ARGUMENTS:
- // pSendList - Optional list of voices this voice should send audio to.
- */\
- STDMETHOD(SetOutputVoices) (THIS_ _In_opt_ const XAUDIO2_VOICE_SENDS* pSendList) PURE; \
- \
- /* NAME: IXAudio2Voice::SetEffectChain
- // DESCRIPTION: Replaces this voice's current effect chain with a new one.
- //
- // ARGUMENTS:
- // pEffectChain - Structure describing the new effect chain to be used.
- */\
- STDMETHOD(SetEffectChain) (THIS_ _In_opt_ const XAUDIO2_EFFECT_CHAIN* pEffectChain) PURE; \
- \
- /* NAME: IXAudio2Voice::EnableEffect
- // DESCRIPTION: Enables an effect in this voice's effect chain.
- //
- // ARGUMENTS:
- // EffectIndex - Index of an effect within this voice's effect chain.
- // OperationSet - Used to identify this call as part of a deferred batch.
- */\
- STDMETHOD(EnableEffect) (THIS_ UINT32 EffectIndex, \
- UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
- \
- /* NAME: IXAudio2Voice::DisableEffect
- // DESCRIPTION: Disables an effect in this voice's effect chain.
- //
- // ARGUMENTS:
- // EffectIndex - Index of an effect within this voice's effect chain.
- // OperationSet - Used to identify this call as part of a deferred batch.
- */\
- STDMETHOD(DisableEffect) (THIS_ UINT32 EffectIndex, \
- UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
- \
- /* NAME: IXAudio2Voice::GetEffectState
- // DESCRIPTION: Returns the running state of an effect.
- //
- // ARGUMENTS:
- // EffectIndex - Index of an effect within this voice's effect chain.
- // pEnabled - Returns the enabled/disabled state of the given effect.
- */\
- STDMETHOD_(void, GetEffectState) (THIS_ UINT32 EffectIndex, _Out_ BOOL* pEnabled) PURE; \
- \
- /* NAME: IXAudio2Voice::SetEffectParameters
- // DESCRIPTION: Sets effect-specific parameters.
- //
- // REMARKS: Unlike IXAPOParameters::SetParameters, this method may
- // be called from any thread. XAudio2 implements
- // appropriate synchronization to copy the parameters to the
- // realtime audio processing thread.
- //
- // ARGUMENTS:
- // EffectIndex - Index of an effect within this voice's effect chain.
- // pParameters - Pointer to an effect-specific parameters block.
- // ParametersByteSize - Size of the pParameters array in bytes.
- // OperationSet - Used to identify this call as part of a deferred batch.
- */\
- STDMETHOD(SetEffectParameters) (THIS_ UINT32 EffectIndex, \
- _In_reads_bytes_(ParametersByteSize) const void* pParameters, \
- UINT32 ParametersByteSize, \
- UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
- \
- /* NAME: IXAudio2Voice::GetEffectParameters
- // DESCRIPTION: Obtains the current effect-specific parameters.
- //
- // ARGUMENTS:
- // EffectIndex - Index of an effect within this voice's effect chain.
- // pParameters - Returns the current values of the effect-specific parameters.
- // ParametersByteSize - Size of the pParameters array in bytes.
- */\
- STDMETHOD(GetEffectParameters) (THIS_ UINT32 EffectIndex, \
- _Out_writes_bytes_(ParametersByteSize) void* pParameters, \
- UINT32 ParametersByteSize) PURE; \
- \
- /* NAME: IXAudio2Voice::SetFilterParameters
- // DESCRIPTION: Sets this voice's filter parameters.
- //
- // ARGUMENTS:
- // pParameters - Pointer to the filter's parameter structure.
- // OperationSet - Used to identify this call as part of a deferred batch.
- */\
- STDMETHOD(SetFilterParameters) (THIS_ _In_ const XAUDIO2_FILTER_PARAMETERS* pParameters, \
- UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
- \
- /* NAME: IXAudio2Voice::GetFilterParameters
- // DESCRIPTION: Returns this voice's current filter parameters.
- //
- // ARGUMENTS:
- // pParameters - Returns the filter parameters.
- */\
- STDMETHOD_(void, GetFilterParameters) (THIS_ _Out_ XAUDIO2_FILTER_PARAMETERS* pParameters) PURE; \
- \
- /* NAME: IXAudio2Voice::SetOutputFilterParameters
- // DESCRIPTION: Sets the filter parameters on one of this voice's sends.
- //
- // ARGUMENTS:
- // pDestinationVoice - Destination voice of the send whose filter parameters will be set.
- // pParameters - Pointer to the filter's parameter structure.
- // OperationSet - Used to identify this call as part of a deferred batch.
- */\
- STDMETHOD(SetOutputFilterParameters) (THIS_ _In_opt_ IXAudio2Voice* pDestinationVoice, \
- _In_ const XAUDIO2_FILTER_PARAMETERS* pParameters, \
- UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
- \
- /* NAME: IXAudio2Voice::GetOutputFilterParameters
- // DESCRIPTION: Returns the filter parameters from one of this voice's sends.
- //
- // ARGUMENTS:
- // pDestinationVoice - Destination voice of the send whose filter parameters will be read.
- // pParameters - Returns the filter parameters.
- */\
- STDMETHOD_(void, GetOutputFilterParameters) (THIS_ _In_opt_ IXAudio2Voice* pDestinationVoice, \
- _Out_ XAUDIO2_FILTER_PARAMETERS* pParameters) PURE; \
- \
- /* NAME: IXAudio2Voice::SetVolume
- // DESCRIPTION: Sets this voice's overall volume level.
- //
- // ARGUMENTS:
- // Volume - New overall volume level to be used, as an amplitude factor.
- // OperationSet - Used to identify this call as part of a deferred batch.
- */\
- STDMETHOD(SetVolume) (THIS_ float Volume, \
- UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
- \
- /* NAME: IXAudio2Voice::GetVolume
- // DESCRIPTION: Obtains this voice's current overall volume level.
- //
- // ARGUMENTS:
- // pVolume: Returns the voice's current overall volume level.
- */\
- STDMETHOD_(void, GetVolume) (THIS_ _Out_ float* pVolume) PURE; \
- \
- /* NAME: IXAudio2Voice::SetChannelVolumes
- // DESCRIPTION: Sets this voice's per-channel volume levels.
- //
- // ARGUMENTS:
- // Channels - Used to confirm the voice's channel count.
- // pVolumes - Array of per-channel volume levels to be used.
- // OperationSet - Used to identify this call as part of a deferred batch.
- */\
- STDMETHOD(SetChannelVolumes) (THIS_ UINT32 Channels, _In_reads_(Channels) const float* pVolumes, \
- UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
- \
- /* NAME: IXAudio2Voice::GetChannelVolumes
- // DESCRIPTION: Returns this voice's current per-channel volume levels.
- //
- // ARGUMENTS:
- // Channels - Used to confirm the voice's channel count.
- // pVolumes - Returns an array of the current per-channel volume levels.
- */\
- STDMETHOD_(void, GetChannelVolumes) (THIS_ UINT32 Channels, _Out_writes_(Channels) float* pVolumes) PURE; \
- \
- /* NAME: IXAudio2Voice::SetOutputMatrix
- // DESCRIPTION: Sets the volume levels used to mix from each channel of this
- // voice's output audio to each channel of a given destination
- // voice's input audio.
- //
- // ARGUMENTS:
- // pDestinationVoice - The destination voice whose mix matrix to change.
- // SourceChannels - Used to confirm this voice's output channel count
- // (the number of channels produced by the last effect in the chain).
- // DestinationChannels - Confirms the destination voice's input channels.
- // pLevelMatrix - Array of [SourceChannels * DestinationChannels] send
- // levels. The level used to send from source channel S to destination
- // channel D should be in pLevelMatrix[S + SourceChannels * D].
- // OperationSet - Used to identify this call as part of a deferred batch.
- */\
- STDMETHOD(SetOutputMatrix) (THIS_ _In_opt_ IXAudio2Voice* pDestinationVoice, \
- UINT32 SourceChannels, UINT32 DestinationChannels, \
- _In_reads_(SourceChannels * DestinationChannels) const float* pLevelMatrix, \
- UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
- \
- /* NAME: IXAudio2Voice::GetOutputMatrix
- // DESCRIPTION: Obtains the volume levels used to send each channel of this
- // voice's output audio to each channel of a given destination
- // voice's input audio.
- //
- // ARGUMENTS:
- // pDestinationVoice - The destination voice whose mix matrix to obtain.
- // SourceChannels - Used to confirm this voice's output channel count
- // (the number of channels produced by the last effect in the chain).
- // DestinationChannels - Confirms the destination voice's input channels.
- // pLevelMatrix - Array of send levels, as above.
- */\
- STDMETHOD_(void, GetOutputMatrix) (THIS_ _In_opt_ IXAudio2Voice* pDestinationVoice, \
- UINT32 SourceChannels, UINT32 DestinationChannels, \
- _Out_writes_(SourceChannels * DestinationChannels) float* pLevelMatrix) PURE; \
- \
- /* NAME: IXAudio2Voice::DestroyVoice
- // DESCRIPTION: Destroys this voice, stopping it if necessary and removing
- // it from the XAudio2 graph.
- */\
- STDMETHOD_(void, DestroyVoice) (THIS) PURE
-
- Declare_IXAudio2Voice_Methods();
-};
-
-
-/**************************************************************************
- *
- * IXAudio2SourceVoice: Source voice management interface.
- *
- **************************************************************************/
-
-#undef INTERFACE
-#define INTERFACE IXAudio2SourceVoice
-DECLARE_INTERFACE_(IXAudio2SourceVoice, IXAudio2Voice)
-{
- // Methods from IXAudio2Voice base interface
- Declare_IXAudio2Voice_Methods();
-
- // NAME: IXAudio2SourceVoice::Start
- // DESCRIPTION: Makes this voice start consuming and processing audio.
- //
- // ARGUMENTS:
- // Flags - Flags controlling how the voice should be started.
- // OperationSet - Used to identify this call as part of a deferred batch.
- //
- STDMETHOD(Start) (THIS_ UINT32 Flags X2DEFAULT(0), UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
-
- // NAME: IXAudio2SourceVoice::Stop
- // DESCRIPTION: Makes this voice stop consuming audio.
- //
- // ARGUMENTS:
- // Flags - Flags controlling how the voice should be stopped.
- // OperationSet - Used to identify this call as part of a deferred batch.
- //
- STDMETHOD(Stop) (THIS_ UINT32 Flags X2DEFAULT(0), UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
-
- // NAME: IXAudio2SourceVoice::SubmitSourceBuffer
- // DESCRIPTION: Adds a new audio buffer to this voice's input queue.
- //
- // ARGUMENTS:
- // pBuffer - Pointer to the buffer structure to be queued.
- // pBufferWMA - Additional structure used only when submitting XWMA data.
- //
- STDMETHOD(SubmitSourceBuffer) (THIS_ _In_ const XAUDIO2_BUFFER* pBuffer, _In_opt_ const XAUDIO2_BUFFER_WMA* pBufferWMA X2DEFAULT(NULL)) PURE;
-
- // NAME: IXAudio2SourceVoice::FlushSourceBuffers
- // DESCRIPTION: Removes all pending audio buffers from this voice's queue.
- //
- STDMETHOD(FlushSourceBuffers) (THIS) PURE;
-
- // NAME: IXAudio2SourceVoice::Discontinuity
- // DESCRIPTION: Notifies the voice of an intentional break in the stream of
- // audio buffers (e.g. the end of a sound), to prevent XAudio2
- // from interpreting an empty buffer queue as a glitch.
- //
- STDMETHOD(Discontinuity) (THIS) PURE;
-
- // NAME: IXAudio2SourceVoice::ExitLoop
- // DESCRIPTION: Breaks out of the current loop when its end is reached.
- //
- // ARGUMENTS:
- // OperationSet - Used to identify this call as part of a deferred batch.
- //
- STDMETHOD(ExitLoop) (THIS_ UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
-
- // NAME: IXAudio2SourceVoice::GetState
- // DESCRIPTION: Returns the number of buffers currently queued on this voice,
- // the pContext value associated with the currently processing
- // buffer (if any), and other voice state information.
- //
- // ARGUMENTS:
- // pVoiceState - Returns the state information.
- // Flags - Flags controlling what voice state is returned.
- //
- STDMETHOD_(void, GetState) (THIS_ _Out_ XAUDIO2_VOICE_STATE* pVoiceState, UINT32 Flags X2DEFAULT(0)) PURE;
-
- // NAME: IXAudio2SourceVoice::SetFrequencyRatio
- // DESCRIPTION: Sets this voice's frequency adjustment, i.e. its pitch.
- //
- // ARGUMENTS:
- // Ratio - Frequency change, expressed as source frequency / target frequency.
- // OperationSet - Used to identify this call as part of a deferred batch.
- //
- STDMETHOD(SetFrequencyRatio) (THIS_ float Ratio,
- UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
-
- // NAME: IXAudio2SourceVoice::GetFrequencyRatio
- // DESCRIPTION: Returns this voice's current frequency adjustment ratio.
- //
- // ARGUMENTS:
- // pRatio - Returns the frequency adjustment.
- //
- STDMETHOD_(void, GetFrequencyRatio) (THIS_ _Out_ float* pRatio) PURE;
-
- // NAME: IXAudio2SourceVoice::SetSourceSampleRate
- // DESCRIPTION: Reconfigures this voice to treat its source data as being
- // at a different sample rate than the original one specified
- // in CreateSourceVoice's pSourceFormat argument.
- //
- // ARGUMENTS:
- // UINT32 - The intended sample rate of further submitted source data.
- //
- STDMETHOD(SetSourceSampleRate) (THIS_ UINT32 NewSourceSampleRate) PURE;
-};
-
-
-/**************************************************************************
- *
- * IXAudio2SubmixVoice: Submixing voice management interface.
- *
- **************************************************************************/
-
-#undef INTERFACE
-#define INTERFACE IXAudio2SubmixVoice
-DECLARE_INTERFACE_(IXAudio2SubmixVoice, IXAudio2Voice)
-{
- // Methods from IXAudio2Voice base interface
- Declare_IXAudio2Voice_Methods();
-
- // There are currently no methods specific to submix voices.
-};
-
-
-/**************************************************************************
- *
- * IXAudio2MasteringVoice: Mastering voice management interface.
- *
- **************************************************************************/
-
-#undef INTERFACE
-#define INTERFACE IXAudio2MasteringVoice
-DECLARE_INTERFACE_(IXAudio2MasteringVoice, IXAudio2Voice)
-{
- // Methods from IXAudio2Voice base interface
- Declare_IXAudio2Voice_Methods();
-
- // NAME: IXAudio2MasteringVoice::GetChannelMask
- // DESCRIPTION: Returns the channel mask for this voice
- //
- // ARGUMENTS:
- // pChannelMask - returns the channel mask for this voice. This corresponds
- // to the dwChannelMask member of WAVEFORMATEXTENSIBLE.
- //
- STDMETHOD(GetChannelMask) (THIS_ _Out_ DWORD* pChannelmask) PURE;
-};
-
-
-/**************************************************************************
- *
- * IXAudio2EngineCallback: Client notification interface for engine events.
- *
- * REMARKS: Contains methods to notify the client when certain events happen
- * in the XAudio2 engine. This interface should be implemented by
- * the client. XAudio2 will call these methods via the interface
- * pointer provided by the client when it calls
- * IXAudio2::RegisterForCallbacks.
- *
- **************************************************************************/
-
-#undef INTERFACE
-#define INTERFACE IXAudio2EngineCallback
-DECLARE_INTERFACE(IXAudio2EngineCallback)
-{
- // Called by XAudio2 just before an audio processing pass begins.
- STDMETHOD_(void, OnProcessingPassStart) (THIS) PURE;
-
- // Called just after an audio processing pass ends.
- STDMETHOD_(void, OnProcessingPassEnd) (THIS) PURE;
-
- // Called in the event of a critical system error which requires XAudio2
- // to be closed down and restarted. The error code is given in Error.
- STDMETHOD_(void, OnCriticalError) (THIS_ HRESULT Error) PURE;
-};
-
-
-/**************************************************************************
- *
- * IXAudio2VoiceCallback: Client notification interface for voice events.
- *
- * REMARKS: Contains methods to notify the client when certain events happen
- * in an XAudio2 voice. This interface should be implemented by the
- * client. XAudio2 will call these methods via an interface pointer
- * provided by the client in the IXAudio2::CreateSourceVoice call.
- *
- **************************************************************************/
-
-#undef INTERFACE
-#define INTERFACE IXAudio2VoiceCallback
-DECLARE_INTERFACE(IXAudio2VoiceCallback)
-{
- // Called just before this voice's processing pass begins.
- STDMETHOD_(void, OnVoiceProcessingPassStart) (THIS_ UINT32 BytesRequired) PURE;
-
- // Called just after this voice's processing pass ends.
- STDMETHOD_(void, OnVoiceProcessingPassEnd) (THIS) PURE;
-
- // Called when this voice has just finished playing a buffer stream
- // (as marked with the XAUDIO2_END_OF_STREAM flag on the last buffer).
- STDMETHOD_(void, OnStreamEnd) (THIS) PURE;
-
- // Called when this voice is about to start processing a new buffer.
- STDMETHOD_(void, OnBufferStart) (THIS_ void* pBufferContext) PURE;
-
- // Called when this voice has just finished processing a buffer.
- // The buffer can now be reused or destroyed.
- STDMETHOD_(void, OnBufferEnd) (THIS_ void* pBufferContext) PURE;
-
- // Called when this voice has just reached the end position of a loop.
- STDMETHOD_(void, OnLoopEnd) (THIS_ void* pBufferContext) PURE;
-
- // Called in the event of a critical error during voice processing,
- // such as a failing xAPO or an error from the hardware XMA decoder.
- // The voice may have to be destroyed and re-created to recover from
- // the error. The callback arguments report which buffer was being
- // processed when the error occurred, and its HRESULT code.
- STDMETHOD_(void, OnVoiceError) (THIS_ void* pBufferContext, HRESULT Error) PURE;
-};
-
-
-/**************************************************************************
- *
- * Macros to make it easier to use the XAudio2 COM interfaces in C code.
- *
- **************************************************************************/
-
-#ifndef __cplusplus
-
-// IXAudio2
-#define IXAudio2_QueryInterface(This,riid,ppvInterface) ((This)->lpVtbl->QueryInterface(This,riid,ppvInterface))
-#define IXAudio2_AddRef(This) ((This)->lpVtbl->AddRef(This))
-#define IXAudio2_Release(This) ((This)->lpVtbl->Release(This))
-#define IXAudio2_CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) ((This)->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain))
-#define IXAudio2_CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) ((This)->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain))
-#define IXAudio2_CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,StreamCategory) ((This)->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,StreamCategory))
-#define IXAudio2_StartEngine(This) ((This)->lpVtbl->StartEngine(This))
-#define IXAudio2_StopEngine(This) ((This)->lpVtbl->StopEngine(This))
-#define IXAudio2_CommitChanges(This,OperationSet) ((This)->lpVtbl->CommitChanges(This,OperationSet))
-#define IXAudio2_GetPerformanceData(This,pPerfData) ((This)->lpVtbl->GetPerformanceData(This,pPerfData))
-#define IXAudio2_SetDebugConfiguration(This,pDebugConfiguration,pReserved) ((This)->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved))
-
-// IXAudio2Voice
-#define IXAudio2Voice_GetVoiceDetails(This,pVoiceDetails) ((This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails))
-#define IXAudio2Voice_SetOutputVoices(This,pSendList) ((This)->lpVtbl->SetOutputVoices(This,pSendList))
-#define IXAudio2Voice_SetEffectChain(This,pEffectChain) ((This)->lpVtbl->SetEffectChain(This,pEffectChain))
-#define IXAudio2Voice_EnableEffect(This,EffectIndex,OperationSet) ((This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet))
-#define IXAudio2Voice_DisableEffect(This,EffectIndex,OperationSet) ((This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet))
-#define IXAudio2Voice_GetEffectState(This,EffectIndex,pEnabled) ((This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled))
-#define IXAudio2Voice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize, OperationSet) ((This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet))
-#define IXAudio2Voice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) ((This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize))
-#define IXAudio2Voice_SetFilterParameters(This,pParameters,OperationSet) ((This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet))
-#define IXAudio2Voice_GetFilterParameters(This,pParameters) ((This)->lpVtbl->GetFilterParameters(This,pParameters))
-#define IXAudio2Voice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) ((This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet))
-#define IXAudio2Voice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) ((This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters))
-#define IXAudio2Voice_SetVolume(This,Volume,OperationSet) ((This)->lpVtbl->SetVolume(This,Volume,OperationSet))
-#define IXAudio2Voice_GetVolume(This,pVolume) ((This)->lpVtbl->GetVolume(This,pVolume))
-#define IXAudio2Voice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) ((This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet))
-#define IXAudio2Voice_GetChannelVolumes(This,Channels,pVolumes) ((This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes))
-#define IXAudio2Voice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) ((This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet))
-#define IXAudio2Voice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) ((This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix))
-#define IXAudio2Voice_DestroyVoice(This) ((This)->lpVtbl->DestroyVoice(This))
-
-// IXAudio2SourceVoice
-#define IXAudio2SourceVoice_GetVoiceDetails IXAudio2Voice_GetVoiceDetails
-#define IXAudio2SourceVoice_SetOutputVoices IXAudio2Voice_SetOutputVoices
-#define IXAudio2SourceVoice_SetEffectChain IXAudio2Voice_SetEffectChain
-#define IXAudio2SourceVoice_EnableEffect IXAudio2Voice_EnableEffect
-#define IXAudio2SourceVoice_DisableEffect IXAudio2Voice_DisableEffect
-#define IXAudio2SourceVoice_GetEffectState IXAudio2Voice_GetEffectState
-#define IXAudio2SourceVoice_SetEffectParameters IXAudio2Voice_SetEffectParameters
-#define IXAudio2SourceVoice_GetEffectParameters IXAudio2Voice_GetEffectParameters
-#define IXAudio2SourceVoice_SetFilterParameters IXAudio2Voice_SetFilterParameters
-#define IXAudio2SourceVoice_GetFilterParameters IXAudio2Voice_GetFilterParameters
-#define IXAudio2SourceVoice_SetOutputFilterParameters IXAudio2Voice_SetOutputFilterParameters
-#define IXAudio2SourceVoice_GetOutputFilterParameters IXAudio2Voice_GetOutputFilterParameters
-#define IXAudio2SourceVoice_SetVolume IXAudio2Voice_SetVolume
-#define IXAudio2SourceVoice_GetVolume IXAudio2Voice_GetVolume
-#define IXAudio2SourceVoice_SetChannelVolumes IXAudio2Voice_SetChannelVolumes
-#define IXAudio2SourceVoice_GetChannelVolumes IXAudio2Voice_GetChannelVolumes
-#define IXAudio2SourceVoice_SetOutputMatrix IXAudio2Voice_SetOutputMatrix
-#define IXAudio2SourceVoice_GetOutputMatrix IXAudio2Voice_GetOutputMatrix
-#define IXAudio2SourceVoice_DestroyVoice IXAudio2Voice_DestroyVoice
-#define IXAudio2SourceVoice_Start(This,Flags,OperationSet) ((This)->lpVtbl->Start(This,Flags,OperationSet))
-#define IXAudio2SourceVoice_Stop(This,Flags,OperationSet) ((This)->lpVtbl->Stop(This,Flags,OperationSet))
-#define IXAudio2SourceVoice_SubmitSourceBuffer(This,pBuffer,pBufferWMA) ((This)->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA))
-#define IXAudio2SourceVoice_FlushSourceBuffers(This) ((This)->lpVtbl->FlushSourceBuffers(This))
-#define IXAudio2SourceVoice_Discontinuity(This) ((This)->lpVtbl->Discontinuity(This))
-#define IXAudio2SourceVoice_ExitLoop(This,OperationSet) ((This)->lpVtbl->ExitLoop(This,OperationSet))
-#define IXAudio2SourceVoice_GetState(This,pVoiceState,Flags) ((This)->lpVtbl->GetState(This,pVoiceState,Flags))
-#define IXAudio2SourceVoice_SetFrequencyRatio(This,Ratio,OperationSet) ((This)->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet))
-#define IXAudio2SourceVoice_GetFrequencyRatio(This,pRatio) ((This)->lpVtbl->GetFrequencyRatio(This,pRatio))
-#define IXAudio2SourceVoice_SetSourceSampleRate(This,NewSourceSampleRate) ((This)->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate))
-
-// IXAudio2SubmixVoice
-#define IXAudio2SubmixVoice_GetVoiceDetails IXAudio2Voice_GetVoiceDetails
-#define IXAudio2SubmixVoice_SetOutputVoices IXAudio2Voice_SetOutputVoices
-#define IXAudio2SubmixVoice_SetEffectChain IXAudio2Voice_SetEffectChain
-#define IXAudio2SubmixVoice_EnableEffect IXAudio2Voice_EnableEffect
-#define IXAudio2SubmixVoice_DisableEffect IXAudio2Voice_DisableEffect
-#define IXAudio2SubmixVoice_GetEffectState IXAudio2Voice_GetEffectState
-#define IXAudio2SubmixVoice_SetEffectParameters IXAudio2Voice_SetEffectParameters
-#define IXAudio2SubmixVoice_GetEffectParameters IXAudio2Voice_GetEffectParameters
-#define IXAudio2SubmixVoice_SetFilterParameters IXAudio2Voice_SetFilterParameters
-#define IXAudio2SubmixVoice_GetFilterParameters IXAudio2Voice_GetFilterParameters
-#define IXAudio2SubmixVoice_SetOutputFilterParameters IXAudio2Voice_SetOutputFilterParameters
-#define IXAudio2SubmixVoice_GetOutputFilterParameters IXAudio2Voice_GetOutputFilterParameters
-#define IXAudio2SubmixVoice_SetVolume IXAudio2Voice_SetVolume
-#define IXAudio2SubmixVoice_GetVolume IXAudio2Voice_GetVolume
-#define IXAudio2SubmixVoice_SetChannelVolumes IXAudio2Voice_SetChannelVolumes
-#define IXAudio2SubmixVoice_GetChannelVolumes IXAudio2Voice_GetChannelVolumes
-#define IXAudio2SubmixVoice_SetOutputMatrix IXAudio2Voice_SetOutputMatrix
-#define IXAudio2SubmixVoice_GetOutputMatrix IXAudio2Voice_GetOutputMatrix
-#define IXAudio2SubmixVoice_DestroyVoice IXAudio2Voice_DestroyVoice
-
-// IXAudio2MasteringVoice
-#define IXAudio2MasteringVoice_GetVoiceDetails IXAudio2Voice_GetVoiceDetails
-#define IXAudio2MasteringVoice_SetOutputVoices IXAudio2Voice_SetOutputVoices
-#define IXAudio2MasteringVoice_SetEffectChain IXAudio2Voice_SetEffectChain
-#define IXAudio2MasteringVoice_EnableEffect IXAudio2Voice_EnableEffect
-#define IXAudio2MasteringVoice_DisableEffect IXAudio2Voice_DisableEffect
-#define IXAudio2MasteringVoice_GetEffectState IXAudio2Voice_GetEffectState
-#define IXAudio2MasteringVoice_SetEffectParameters IXAudio2Voice_SetEffectParameters
-#define IXAudio2MasteringVoice_GetEffectParameters IXAudio2Voice_GetEffectParameters
-#define IXAudio2MasteringVoice_SetFilterParameters IXAudio2Voice_SetFilterParameters
-#define IXAudio2MasteringVoice_GetFilterParameters IXAudio2Voice_GetFilterParameters
-#define IXAudio2MasteringVoice_SetOutputFilterParameters IXAudio2Voice_SetOutputFilterParameters
-#define IXAudio2MasteringVoice_GetOutputFilterParameters IXAudio2Voice_GetOutputFilterParameters
-#define IXAudio2MasteringVoice_SetVolume IXAudio2Voice_SetVolume
-#define IXAudio2MasteringVoice_GetVolume IXAudio2Voice_GetVolume
-#define IXAudio2MasteringVoice_SetChannelVolumes IXAudio2Voice_SetChannelVolumes
-#define IXAudio2MasteringVoice_GetChannelVolumes IXAudio2Voice_GetChannelVolumes
-#define IXAudio2MasteringVoice_SetOutputMatrix IXAudio2Voice_SetOutputMatrix
-#define IXAudio2MasteringVoice_GetOutputMatrix IXAudio2Voice_GetOutputMatrix
-#define IXAudio2MasteringVoice_DestroyVoice IXAudio2Voice_DestroyVoice
-#define IXAudio2MasteringVoice_GetChannelMask(This,pChannelMask) ((This)->lpVtbl->GetChannelMask(This,pChannelMask))
-
-#endif // #ifndef __cplusplus
-
-
-/**************************************************************************
- *
- * Utility functions used to convert from pitch in semitones and volume
- * in decibels to the frequency and amplitude ratio units used by XAudio2.
- * These are only defined if the client #defines XAUDIO2_HELPER_FUNCTIONS
- * prior to #including xaudio2.h.
- *
- **************************************************************************/
-
-#ifdef XAUDIO2_HELPER_FUNCTIONS
-
-#define _USE_MATH_DEFINES // Make math.h define M_PI
-#include <math.h> // For powf, log10f, sinf and asinf
-
-// Calculate the argument to SetVolume from a decibel value
-__inline float XAudio2DecibelsToAmplitudeRatio(float Decibels)
-{
- return powf(10.0f, Decibels / 20.0f);
-}
-
-// Recover a volume in decibels from an amplitude factor
-__inline float XAudio2AmplitudeRatioToDecibels(float Volume)
-{
- if (Volume == 0)
- {
- return -3.402823466e+38f; // Smallest float value (-FLT_MAX)
- }
- return 20.0f * log10f(Volume);
-}
-
-// Calculate the argument to SetFrequencyRatio from a semitone value
-__inline float XAudio2SemitonesToFrequencyRatio(float Semitones)
-{
- // FrequencyRatio = 2 ^ Octaves
- // = 2 ^ (Semitones / 12)
- return powf(2.0f, Semitones / 12.0f);
-}
-
-// Recover a pitch in semitones from a frequency ratio
-__inline float XAudio2FrequencyRatioToSemitones(float FrequencyRatio)
-{
- // Semitones = 12 * log2(FrequencyRatio)
- // = 12 * log2(10) * log10(FrequencyRatio)
- return 39.86313713864835f * log10f(FrequencyRatio);
-}
-
-// Convert from filter cutoff frequencies expressed in Hertz to the radian
-// frequency values used in XAUDIO2_FILTER_PARAMETERS.Frequency, state-variable
-// filter types only. Use XAudio2CutoffFrequencyToOnePoleCoefficient() for one-pole filter types.
-// Note that the highest CutoffFrequency supported is SampleRate/6.
-// Higher values of CutoffFrequency will return XAUDIO2_MAX_FILTER_FREQUENCY.
-__inline float XAudio2CutoffFrequencyToRadians(float CutoffFrequency, UINT32 SampleRate)
-{
- if ((UINT32)(CutoffFrequency * 6.0f) >= SampleRate)
- {
- return XAUDIO2_MAX_FILTER_FREQUENCY;
- }
- return 2.0f * sinf((float)M_PI * CutoffFrequency / SampleRate);
-}
-
-// Convert from radian frequencies back to absolute frequencies in Hertz
-__inline float XAudio2RadiansToCutoffFrequency(float Radians, float SampleRate)
-{
- return SampleRate * asinf(Radians / 2.0f) / (float)M_PI;
-}
-
-// Convert from filter cutoff frequencies expressed in Hertz to the filter
-// coefficients used with XAUDIO2_FILTER_PARAMETERS.Frequency,
-// LowPassOnePoleFilter and HighPassOnePoleFilter filter types only.
-// Use XAudio2CutoffFrequencyToRadians() for state-variable filter types.
-__inline float XAudio2CutoffFrequencyToOnePoleCoefficient(float CutoffFrequency, UINT32 SampleRate)
-{
- if ((UINT32)CutoffFrequency >= SampleRate)
- {
- return XAUDIO2_MAX_FILTER_FREQUENCY;
- }
- return ( 1.0f - powf(1.0f - 2.0f * CutoffFrequency / SampleRate, 2.0f) );
-}
-
-
-#endif // #ifdef XAUDIO2_HELPER_FUNCTIONS
-
-
-/**************************************************************************
- *
- * XAudio2Create: Top-level function that creates an XAudio2 instance.
- *
- * ARGUMENTS:
- *
- * Flags - Flags specifying the XAudio2 object's behavior. Currently
- * unused, must be set to 0.
- *
- * XAudio2Processor - An XAUDIO2_PROCESSOR value that specifies the
- * hardware threads (Xbox) or processors (Windows) that XAudio2
- * will use. Note that XAudio2 supports concurrent processing on
- * multiple threads, using any combination of XAUDIO2_PROCESSOR
- * flags. The values are platform-specific; platform-independent
- * code can use XAUDIO2_DEFAULT_PROCESSOR to use the default on
- * each platform.
- *
- **************************************************************************/
-
-#if (defined XAUDIO2_EXPORT)
- // We're building xaudio2.dll
- #define XAUDIO2_STDAPI extern "C" __declspec(dllexport) HRESULT __stdcall
-#elif (defined DX_BUILD)
- // We're building xaudio2 as a static library
- #define XAUDIO2_STDAPI STDAPI
-#else
- // We're an xaudio2 client
- #define XAUDIO2_STDAPI extern "C" __declspec(dllimport) HRESULT __stdcall
-#endif
-
-XAUDIO2_STDAPI XAudio2Create(_Outptr_ IXAudio2** ppXAudio2, UINT32 Flags X2DEFAULT(0),
- XAUDIO2_PROCESSOR XAudio2Processor X2DEFAULT(XAUDIO2_DEFAULT_PROCESSOR));
-
-// Undo the #pragma pack(push, 1) directive at the top of this file
-#pragma pack(pop)
-
-#endif // #ifndef GUID_DEFS_ONLY
-
-#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
-#pragma endregion
-
-#endif // #ifndef __XAUDIO2_INCLUDED__
-
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 00000000000..96249671a2c
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,365 @@
+The source code to MAME is provided under the GNU General Public License version 2 or later as of Git revision 35ccf865aa366845b574e1fdbc71c4866b3d6a0f and the upcoming release of MAME 0.172. Source files may also be licensed as specified in the file header. This license does not apply to prior versions of MAME.
+<br />MAME is a registered trademark of Nicola Salmoria.
+
+The text of version 2 of the GNU General Public License follows.
+
+ Copyright (C) 1997-2016 MAMEDev and contributors
+
+ This program 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.
+
+ 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.
+
+GNU GENERAL PUBLIC LICENSE
+==========================
+Version 2, June 1991
+
+> Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+# Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+
+# GNU GENERAL PUBLIC LICENSE #
+## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ##
+
+- *0\.* This License applies to any program or other work which contains
+ a notice placed by the copyright holder saying it may be distributed
+ under the terms of this General Public License. The "Program", below,
+ refers to any such program or work, and a "work based on the Program"
+ means either the Program or any derivative work under copyright law:
+ that is to say, a work containing the Program or a portion of it,
+ either verbatim or with modifications and/or translated into another
+ language. (Hereinafter, translation is included without limitation in
+ the term "modification".) Each licensee is addressed as "you".
+
+ Activities other than copying, distribution and modification are not
+ covered by this License; they are outside its scope. The act of
+ running the Program is not restricted, and the output from the Program
+ is covered only if its contents constitute a work based on the
+ Program (independent of having been made by running the Program).
+ Whether that is true depends on what the Program does.
+
+- 1\. You may copy and distribute verbatim copies of the Program's
+ source code as you receive it, in any medium, provided that you
+ conspicuously and appropriately publish on each copy an appropriate
+ copyright notice and disclaimer of warranty; keep intact all the
+ notices that refer to this License and to the absence of any warranty;
+ and give any other recipients of the Program a copy of this License
+ along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy, and
+ you may at your option offer warranty protection in exchange for a fee.
+
+- 2\. You may modify your copy or copies of the Program or any portion
+ of it, thus forming a work based on the Program, and copy and
+ distribute such modifications or work under the terms of Section 1
+ above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the Program,
+ and can be reasonably considered independent and separate works in
+ themselves, then this License, and its terms, do not apply to those
+ sections when you distribute them as separate works. But when you
+ distribute the same sections as part of a whole which is a work based
+ on the Program, the distribution of the whole must be on the terms of
+ this License, whose permissions for other licensees extend to the
+ entire whole, and thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest
+ your rights to work written entirely by you; rather, the intent is to
+ exercise the right to control the distribution of derivative or
+ collective works based on the Program.
+
+ In addition, mere aggregation of another work not based on the Program
+ with the Program (or with a work based on the Program) on a volume of
+ a storage or distribution medium does not bring the other work under
+ the scope of this License.
+
+- 3\. You may copy and distribute the Program (or a work based on it,
+ under Section 2) in object code or executable form under the terms of
+ Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+ The source code for a work means the preferred form of the work for
+ making modifications to it. For an executable work, complete source
+ code means all the source code for all modules it contains, plus any
+ associated interface definition files, plus the scripts used to
+ control compilation and installation of the executable. However, as a
+ special exception, the source code distributed need not include
+ anything that is normally distributed (in either source or binary
+ form) with the major components (compiler, kernel, and so on) of the
+ operating system on which the executable runs, unless that component
+ itself accompanies the executable.
+
+ If distribution of executable or object code is made by offering
+ access to copy from a designated place, then offering equivalent
+ access to copy the source code from the same place counts as
+ distribution of the source code, even though third parties are not
+ compelled to copy the source along with the object code.
+
+- 4\. You may not copy, modify, sublicense, or distribute the Program
+ except as expressly provided under this License. Any attempt
+ otherwise to copy, modify, sublicense or distribute the Program is
+ void, and will automatically terminate your rights under this License.
+ However, parties who have received copies, or rights, from you under
+ this License will not have their licenses terminated so long as such
+ parties remain in full compliance.
+
+- 5\. You are not required to accept this License, since you have not
+ signed it. However, nothing else grants you permission to modify or
+ distribute the Program or its derivative works. These actions are
+ prohibited by law if you do not accept this License. Therefore, by
+ modifying or distributing the Program (or any work based on the
+ Program), you indicate your acceptance of this License to do so, and
+ all its terms and conditions for copying, distributing or modifying
+ the Program or works based on it.
+
+- 6\. Each time you redistribute the Program (or any work based on the
+ Program), the recipient automatically receives a license from the
+ original licensor to copy, distribute or modify the Program subject to
+ these terms and conditions. You may not impose any further
+ restrictions on the recipients' exercise of the rights granted herein.
+ You are not responsible for enforcing compliance by third parties to
+ this License.
+
+- 7\. If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot
+ distribute so as to satisfy simultaneously your obligations under this
+ License and any other pertinent obligations, then as a consequence you
+ may not distribute the Program at all. For example, if a patent
+ license would not permit royalty-free redistribution of the Program by
+ all those who receive copies directly or indirectly through you, then
+ the only way you could satisfy both it and this License would be to
+ refrain entirely from distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable under
+ any particular circumstance, the balance of the section is intended to
+ apply and the section as a whole is intended to apply in other
+ circumstances.
+
+ It is not the purpose of this section to induce you to infringe any
+ patents or other property right claims or to contest validity of any
+ such claims; this section has the sole purpose of protecting the
+ integrity of the free software distribution system, which is
+ implemented by public license practices. Many people have made
+ generous contributions to the wide range of software distributed
+ through that system in reliance on consistent application of that
+ system; it is up to the author/donor to decide if he or she is willing
+ to distribute software through any other system and a licensee cannot
+ impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to
+ be a consequence of the rest of this License.
+
+- 8\. If the distribution and/or use of the Program is restricted in
+ certain countries either by patents or by copyrighted interfaces, the
+ original copyright holder who places the Program under this License
+ may add an explicit geographical distribution limitation excluding
+ those countries, so that distribution is permitted only in or among
+ countries not thus excluded. In such case, this License incorporates
+ the limitation as if written in the body of this License.
+
+- 9\. The Free Software Foundation may publish revised and/or new versions
+ of the General Public License from time to time. Such new versions will
+ be similar in spirit to the present version, but may differ in detail to
+ address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Program
+ specifies a version number of this License which applies to it and "any
+ later version", you have the option of following the terms and conditions
+ either of that version or of any later version published by the Free
+ Software Foundation. If the Program does not specify a version number of
+ this License, you may choose any version ever published by the Free Software
+ Foundation.
+
+- 10\. If you wish to incorporate parts of the Program into other free
+ programs whose distribution conditions are different, write to the author
+ to ask for permission. For software which is copyrighted by the Free
+ Software Foundation, write to the Free Software Foundation; we sometimes
+ make exceptions for this. Our decision will be guided by the two goals
+ of preserving the free status of all derivatives of our free software and
+ of promoting the sharing and reuse of software generally.
+
+
+## NO WARRANTY
+
+- 11\. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+ REPAIR OR CORRECTION.
+
+- 12\. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES.
+
+## END OF TERMS AND CONDITIONS ##
+
+---------------------------------------------------------------------------
+
+### How to Apply These Terms to Your New Programs ###
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program 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.
+
+ 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.
+
+ Also add information on how to contact you by electronic and paper mail.
+
+ If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+ The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+ You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/README.md b/README.md
index a83e4a627fe..4cdcd8e7d03 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,19 @@
# **MAME** #
-[![Build Status](https://travis-ci.org/mamedev/mame.svg)](https://travis-ci.org/mamedev/mame) [![Build status](https://ci.appveyor.com/api/projects/status/te0qy56b72tp5kmo?svg=true)](https://ci.appveyor.com/project/startaq/mame) [![Join the chat at https://gitter.im/mamedev/mame](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mamedev/mame?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[![Join the chat at https://gitter.im/mamedev/mame](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mamedev/mame?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
What is MAME?
=============
-MAME stands for Multiple Arcade Machine Emulator.
+MAME originally stood for Multiple Arcade Machine Emulator.
-MAME's purpose is to preserve decades of video-game history. As gaming technology continues to rush forward, MAME prevents these important "vintage" games from being lost and forgotten. This is achieved by documenting the hardware and how it functions. The source code to MAME serves as this documentation. The fact that the games are playable serves primarily to validate the accuracy of the documentation (how else can you prove that you have recreated the hardware faithfully?).
-
-
-What is MESS?
-=============
-
-MESS (Multi Emulator Super System) is the sister project of MAME. MESS documents the hardware for a wide variety of (mostly vintage) computers, video game consoles, and calculators, as MAME does for arcade games.
-
-The MESS and MAME projects live in the same source repository and share much of the same code, but are different build targets.
-
-
-License
-=======
-
-MAME is in the process of becoming a Free and Open Source project. We are still in the process of contacting all developers who have contributed in the past. We have received approval for the vast majority of contributions.
-
-Going forward, we will be using the 3-Clause BSD license for the core, and the LGPL version 2.1 or later, and the GPL version 2.0 or later, for certain drivers. As a whole, MAME will be delivered under the GPL version 2.0 or later.
-As we are still contacting developers, MAME is still distributed under the [MAME license](docs/mamelicense.txt) as of this time. If you have not been contacted yet, and believe you have contributed code to MAME in the past, please [contact us](mailto:mamedev@mamedev.org).
+MAME's purpose is to preserve decades of software history. As electronic technology continues to rush forward, MAME prevents this important "vintage" software from being lost and forgotten. This is achieved by documenting the hardware and how it functions. The source code to MAME serves as this documentation. The fact that the software is usable serves primarily to validate the accuracy of the documentation (how else can you prove that you have recreated the hardware faithfully?). Over time, MAME absorbed the sister-project MESS (Multi Emulator Super System), so MAME now documents a wide variety of (mostly vintage) computers, video game consoles and calculators, in addition to the arcade video games that were its initial focus.
How to compile?
-=============
+===============
-If you're on a *nix system, it could be as easy as typing
+If you're on a *NIX or OSX system, it could be as easy as typing
```
make
@@ -48,11 +31,25 @@ for an arcade-only build, or
make SUBTARGET=mess
```
-for a MESS build (provided you have all the [prerequisites](http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=35138)).
+for MESS build.
-For Windows users, we provide a ready-made [build environment](http://mamedev.org/tools/) based on MinGW-w64. [Visual Studio builds](http://wiki.mamedev.org/index.php?title=Building_MAME_using_Microsoft_Visual_Studio_compilers) are also possible.
+For Linux users we have provided you with all the [prerequisites](http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=35138).
+For recent versions of OSX you need to install [Xcode](https://developer.apple.com/xcode/) including command-line tools and [SDL 2.0](https://www.libsdl.org/download-2.0.php).
+For Windows users, we provide a ready-made [build environment](http://mamedev.org/tools/) based on MinGW-w64.
+
+Visual Studio builds are also possible, but you still need [build environment](http://mamedev.org/tools/) based on MinGW-w64.
+In order to generate solution and project files just run:
+
+```
+make vs2015
+```
+or use this command to build it directly using msbuild
+
+```
+make vs2015 MSBUILD=1
+```
Where can I find out more?
@@ -72,5 +69,28 @@ MAME source code should be viewed and edited with your editor set to use four sp
Some parts of the code follow [GNU style](http://www.gnu.org/prep/standards/html_node/Formatting.html); some parts of the code follow [K&R style](https://en.wikipedia.org/wiki/Indent_style#K.26R_style) -- mostly depending on who wrote the original version. **Above all else, be consistent with what you modify, and keep whitespace changes to a minimum when modifying existing source.** For new code, the majority tends to prefer GNU style, so if you don't care much, use that.
-All contributors need to either add standard header for license info (on new files) or send us their wish under which of licenses they would like their code to be published under :[BSD-3-Clause](http://spdx.org/licenses/BSD-3-Clause), or for new files in mame/ or mess/, either the [BSD-3-Clause](http://spdx.org/licenses/BSD-3-Clause) license, the [LGPL-2.1+](http://spdx.org/licenses/LGPL-2.1+), or the [GPL-2.0+](http://spdx.org/licenses/GPL-2.0+).
+All contributors need to either add a standard header for license info (on new files) or inform us of their wishes regarding which of the following licenses they would like their code to be made available under: the [BSD-3-Clause](http://opensource.org/licenses/BSD-3-Clause) license, the [LGPL-2.1](http://opensource.org/licenses/LGPL-2.1), or the [GPL-2.0](http://opensource.org/licenses/GPL-2.0).
+
+License
+=======
+The MAME project as a whole is distributed under the terms of the [GNU General Public License, version 2 or later](http://opensource.org/licenses/GPL-2.0) (GPL-2.0+), since it contains code made available under multiple GPL-compatible licenses. A great majority of files (over 90% including core files) are under the [BSD-3-Clause License](http://opensource.org/licenses/BSD-3-Clause) and we would encourage new contributors to distribute files under this license.
+
+Please note that MAME is a registered trademark of Nicola Salmoria, and permission is required to use the "MAME" name, logo, or wordmark.
+
+ Copyright (C) 1997-2016 MAMEDev and contributors
+
+ This program 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.
+
+ 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.
+Please see [LICENSE.md](LICENSE.md) for further details.
diff --git a/artwork/LICENSE b/artwork/LICENSE
new file mode 100644
index 00000000000..670154e3538
--- /dev/null
+++ b/artwork/LICENSE
@@ -0,0 +1,116 @@
+CC0 1.0 Universal
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific
+works ("Commons") that the public can reliably and without fear of later
+claims of infringement build upon, modify, incorporate in other works, reuse
+and redistribute as freely as possible in any form whatsoever and for any
+purposes, including without limitation commercial purposes. These owners may
+contribute to the Commons to promote the ideal of a free culture and the
+further production of creative, cultural and scientific works, or to gain
+reputation or greater distribution for their Work in part through the use and
+efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation
+of additional consideration or compensation, the person associating CC0 with a
+Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+and publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not limited
+to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
+ and translate a Work;
+
+ ii. moral rights retained by the original author(s) and/or performer(s);
+
+ iii. publicity and privacy rights pertaining to a person's image or likeness
+ depicted in a Work;
+
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+
+ v. rights protecting the extraction, dissemination, use and reuse of data in
+ a Work;
+
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation thereof,
+ including any amended or successor version of such directive); and
+
+ vii. other similar, equivalent or corresponding rights throughout the world
+ based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer's heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free,
+non transferable, non sublicensable, non exclusive, irrevocable and
+unconditional license to exercise Affirmer's Copyright and Related Rights in
+the Work (i) in all territories worldwide, (ii) for the maximum duration
+provided by applicable law or treaty (including future time extensions), (iii)
+in any current or future medium and for any number of copies, and (iv) for any
+purpose whatsoever, including without limitation commercial, advertising or
+promotional purposes (the "License"). The License shall be deemed effective as
+of the date CC0 was applied by Affirmer to the Work. Should any part of the
+License for any reason be judged legally invalid or ineffective under
+applicable law, such partial invalidity or ineffectiveness shall not
+invalidate the remainder of the License, and in such case Affirmer hereby
+affirms that he or she will not (i) exercise any of his or her remaining
+Copyright and Related Rights in the Work or (ii) assert any associated claims
+and causes of action with respect to the Work, in either case contrary to
+Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+
+ b. Affirmer offers the Work as-is and makes no representations or warranties
+ of any kind concerning the Work, express, implied, statutory or otherwise,
+ including without limitation warranties of title, merchantability, fitness
+ for a particular purpose, non infringement, or the absence of latent or
+ other defects, accuracy, or the present or absence of errors, whether or not
+ discoverable, all to the greatest extent permissible under applicable law.
+
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without limitation
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
+ disclaims responsibility for obtaining any necessary consents, permissions
+ or other rights required for any use of the Work.
+
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to this
+ CC0 or use of the Work.
+
+For more information, please see
+<http://creativecommons.org/publicdomain/zero/1.0/>
diff --git a/artwork/README.md b/artwork/README.md
new file mode 100644
index 00000000000..4505ae5c1e5
--- /dev/null
+++ b/artwork/README.md
@@ -0,0 +1,5 @@
+# **Artwork** #
+
+Artwork files are representing work of multiple people and are used by layout manager and shaders.
+
+Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file
diff --git a/benchmarks/LICENSE b/benchmarks/LICENSE
new file mode 100644
index 00000000000..4d9210d10e1
--- /dev/null
+++ b/benchmarks/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2016, MAME Development Team
+All rights reserved.
+
+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 bsd3 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/benchmarks/README.md b/benchmarks/README.md
new file mode 100644
index 00000000000..00f5aa9922e
--- /dev/null
+++ b/benchmarks/README.md
@@ -0,0 +1,5 @@
+# **Benchmarks** #
+
+Cointains code by various developers and it is used to benchmark MAME code
+
+Licensed under [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause)
diff --git a/benchmarks/eminline_native.cpp b/benchmarks/eminline_native.cpp
index 07bfa02bb1d..d5f622075b6 100644
--- a/benchmarks/eminline_native.cpp
+++ b/benchmarks/eminline_native.cpp
@@ -1,6 +1,3 @@
-// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
-
#include "benchmark/benchmark_api.h"
#include "osdcomm.h"
#include "eminline.h"
diff --git a/benchmarks/eminline_noasm.cpp b/benchmarks/eminline_noasm.cpp
index 43c9e36b020..0344f074c01 100644
--- a/benchmarks/eminline_noasm.cpp
+++ b/benchmarks/eminline_noasm.cpp
@@ -1,6 +1,3 @@
-// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
-
#include "benchmark/benchmark_api.h"
#include <time.h>
#include "osdcore.h"
diff --git a/benchmarks/main.cpp b/benchmarks/main.cpp
index c859b918976..065222a39ff 100644
--- a/benchmarks/main.cpp
+++ b/benchmarks/main.cpp
@@ -1,6 +1,3 @@
-// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
-
#include "benchmark/benchmark_api.h"
BENCHMARK_MAIN(); \ No newline at end of file
diff --git a/bgfx/LICENSE b/bgfx/LICENSE
new file mode 100644
index 00000000000..e1a4f1f53d6
--- /dev/null
+++ b/bgfx/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2016, Ryan Holtz and MAME Development Team
+All rights reserved.
+
+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 bsd3 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/bgfx/README.md b/bgfx/README.md
new file mode 100644
index 00000000000..2b165723286
--- /dev/null
+++ b/bgfx/README.md
@@ -0,0 +1,5 @@
+# **Tests** #
+
+Cointains definitions for BGFX shader chains
+
+Licensed under [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause) by Ryan Holtz and MAME Development Team
diff --git a/docs/LICENSE b/docs/LICENSE
new file mode 100644
index 00000000000..670154e3538
--- /dev/null
+++ b/docs/LICENSE
@@ -0,0 +1,116 @@
+CC0 1.0 Universal
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific
+works ("Commons") that the public can reliably and without fear of later
+claims of infringement build upon, modify, incorporate in other works, reuse
+and redistribute as freely as possible in any form whatsoever and for any
+purposes, including without limitation commercial purposes. These owners may
+contribute to the Commons to promote the ideal of a free culture and the
+further production of creative, cultural and scientific works, or to gain
+reputation or greater distribution for their Work in part through the use and
+efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation
+of additional consideration or compensation, the person associating CC0 with a
+Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+and publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not limited
+to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
+ and translate a Work;
+
+ ii. moral rights retained by the original author(s) and/or performer(s);
+
+ iii. publicity and privacy rights pertaining to a person's image or likeness
+ depicted in a Work;
+
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+
+ v. rights protecting the extraction, dissemination, use and reuse of data in
+ a Work;
+
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation thereof,
+ including any amended or successor version of such directive); and
+
+ vii. other similar, equivalent or corresponding rights throughout the world
+ based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer's heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free,
+non transferable, non sublicensable, non exclusive, irrevocable and
+unconditional license to exercise Affirmer's Copyright and Related Rights in
+the Work (i) in all territories worldwide, (ii) for the maximum duration
+provided by applicable law or treaty (including future time extensions), (iii)
+in any current or future medium and for any number of copies, and (iv) for any
+purpose whatsoever, including without limitation commercial, advertising or
+promotional purposes (the "License"). The License shall be deemed effective as
+of the date CC0 was applied by Affirmer to the Work. Should any part of the
+License for any reason be judged legally invalid or ineffective under
+applicable law, such partial invalidity or ineffectiveness shall not
+invalidate the remainder of the License, and in such case Affirmer hereby
+affirms that he or she will not (i) exercise any of his or her remaining
+Copyright and Related Rights in the Work or (ii) assert any associated claims
+and causes of action with respect to the Work, in either case contrary to
+Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+
+ b. Affirmer offers the Work as-is and makes no representations or warranties
+ of any kind concerning the Work, express, implied, statutory or otherwise,
+ including without limitation warranties of title, merchantability, fitness
+ for a particular purpose, non infringement, or the absence of latent or
+ other defects, accuracy, or the present or absence of errors, whether or not
+ discoverable, all to the greatest extent permissible under applicable law.
+
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without limitation
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
+ disclaims responsibility for obtaining any necessary consents, permissions
+ or other rights required for any use of the Work.
+
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to this
+ CC0 or use of the Work.
+
+For more information, please see
+<http://creativecommons.org/publicdomain/zero/1.0/>
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 00000000000..669c251a923
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,5 @@
+# **Docs** #
+
+Documentation of MAME is work of many different contributors, and contain information about usage and internals of MAME.
+
+Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file
diff --git a/docs/mame.txt b/docs/mame.txt
index b675d2145a3..154ebcbc2db 100644
--- a/docs/mame.txt
+++ b/docs/mame.txt
@@ -1,77 +1,61 @@
-MAME(tm), the Multiple Arcade Machine Emulator
-Copyright (c) 1997-2013 by Nicola Salmoria and the MAME team
-MAME is a trademark owned by Nicola Salmoria
+MAME(r)
+Copyright (c) 1997-2016 by MAMEdev and contributors
+MAME is a registered trademark of Nicola Salmoria
----------
I. Purpose
----------
-MAME is strictly a non-profit project. Its main purpose is to be a
-reference to the inner workings of the emulated arcade machines. This is
-done both for educational purposes and for preservation purposes, in
-order to prevent many historical games from disappearing forever once the
-hardware they run on stops working. Of course, in order to preserve the
-games and demonstrate that the emulated behavior matches the original,
-you must also be able to actually play the games. This is considered a
-nice side effect, and is not MAME's primary focus.
+MAME main purpose is to be a reference to the inner workings of the
+emulated machines. This is done both for educational purposes and for
+preservation purposes, in order to prevent historical software from
+disappearing forever once the hardware it runs on stops working. Of
+course, in order to preserve the software and demonstrate that the
+emulated behavior matches the original, one must also be able to
+actually use the software. This is considered a nice side effect, and is
+not MAME's primary focus.
It is not our intention to infringe on any copyrights or patents on the
original games. All of MAME's source code is either our own or freely
-available. To operate, the emulator requires images of the original ROMs,
-CDs, or hard disks from the arcade machines, which must be provided by
-the user. No portions of the original game code are included in the
-executable.
+available. To operate, the emulator requires images of the original
+ROMs, CDs, hard disks or other media from the machines, which must be
+provided by the user. No portions of the original game code are included
+in the executable.
--------
II. Cost
--------
-MAME is free. Its source code is free. Selling either is not allowed.
+MAME is free. Its source code is free. The project as whole is
+distributed under the GNU General Public License, version 2 or later
+(GPL-2.0+), but most of code (including core functionality) is also
+available under the 3-clause BSD license (BSD-3-clause).
-----------------
-III. Image Files
-----------------
-ROM, CD, and hard disk images are all copyrighted material. They cannot
-be distributed without the explicit permission of the copyright owner.
-They are not "abandonware", nor have any of the games supported by MAME
-passed out of copyright.
+-------------------------
+III. Software Image Files
+-------------------------
+ROM, CD, hard disk and other media images are all copyrighted material.
+They cannot be distributed without the explicit permission of the
+copyright holder(s). They are not "abandonware", nor has any of the
+software supported by MAME passed out of copyright.
MAME is not intended to be used as a tool for mass copyright
infringement. Therefore, it is strongly against the authors' wishes to
-sell, advertise, or link to resources that provide illegal copies of ROM,
-CD, or hard disk images.
+sell, advertise, or link to resources that provide illegal copies of
+ROM, CD, hard disk or other media images.
--------------------
IV. Derivative Works
--------------------
-Derivative works are allowed under the MAME license. However, you are
-discouraged from providing specific functionality that goes against the
-philosophy of the MAME team. Specifically:
-
-* Do not add games which are more recent than 3 years old, or which are
-still being sold new by the company that produced them. MAME is not
-intended to be a platform that competes with arcade games that are still
-being actively sold.
-
-* Do not provide a means of generating a list of games that specifically
-identifies those games for which the user does not have image files. This
-only encourages users to seek out sources for illegal ROM, CD, and hard
-disk images in order to "complete" their collection.
-
-* Do not remove the startup screen that contains information about why
-certain non-working games don't work. This only serves to generate a
-bunch of useless email traffic to the developers asking why the games
-don't work.
-
-Because the name MAME is trademarked, you must abide by the rules of the
-trademark usage if you wish to use "MAME" as part of the name your
-derivative work. In general, this means you must request permission,
-which requires that you follow the guidelines above.
+Because the name MAME is trademarked, you must abide by the rules set
+out for trademark usage if you wish to use "MAME" as part of the name
+your derivative work. In general, this means you must request
+permission, which requires that you follow the guidelines above.
The version number of any derivative work should reflect the version
-number of the MAME release it was derived from.
+number of the MAME release from which it was was derived.
-------------------------------
diff --git a/docs/mamelicense.txt b/docs/mamelicense.txt
deleted file mode 100644
index 31f5d897dd3..00000000000
--- a/docs/mamelicense.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-The MAME project, as a whole, is currently released under the following
-license, known as the MAME License.
-
-Most code in MAME is under a more permissive license, or dual-licensed.
-This is noted in per-file headers which specify the alternate license.
-
-The text of the MAME License follows.
-
-Copyright Nicola Salmoria and the MAME team
-All rights reserved.
-
-Redistribution and use of this code or any derivative works are permitted
-provided that the following conditions are met:
-
-* Redistributions may not be sold, nor may they be used in a commercial
-product or activity.
-
-* Redistributions that are modified from the original source must include the
-complete source code, including the source code for all components used by a
-binary built from the modified sources. However, as a special exception, the
-source code distributed need not include anything that is normally distributed
-(in either source or binary form) with the major components (compiler, kernel,
-and so on) of the operating system on which the executable runs, unless that
-component itself accompanies the executable.
-
-* Redistributions 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.
-
-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 OWNER 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/doxygen/LICENSE b/doxygen/LICENSE
new file mode 100644
index 00000000000..670154e3538
--- /dev/null
+++ b/doxygen/LICENSE
@@ -0,0 +1,116 @@
+CC0 1.0 Universal
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific
+works ("Commons") that the public can reliably and without fear of later
+claims of infringement build upon, modify, incorporate in other works, reuse
+and redistribute as freely as possible in any form whatsoever and for any
+purposes, including without limitation commercial purposes. These owners may
+contribute to the Commons to promote the ideal of a free culture and the
+further production of creative, cultural and scientific works, or to gain
+reputation or greater distribution for their Work in part through the use and
+efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation
+of additional consideration or compensation, the person associating CC0 with a
+Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+and publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not limited
+to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
+ and translate a Work;
+
+ ii. moral rights retained by the original author(s) and/or performer(s);
+
+ iii. publicity and privacy rights pertaining to a person's image or likeness
+ depicted in a Work;
+
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+
+ v. rights protecting the extraction, dissemination, use and reuse of data in
+ a Work;
+
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation thereof,
+ including any amended or successor version of such directive); and
+
+ vii. other similar, equivalent or corresponding rights throughout the world
+ based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer's heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free,
+non transferable, non sublicensable, non exclusive, irrevocable and
+unconditional license to exercise Affirmer's Copyright and Related Rights in
+the Work (i) in all territories worldwide, (ii) for the maximum duration
+provided by applicable law or treaty (including future time extensions), (iii)
+in any current or future medium and for any number of copies, and (iv) for any
+purpose whatsoever, including without limitation commercial, advertising or
+promotional purposes (the "License"). The License shall be deemed effective as
+of the date CC0 was applied by Affirmer to the Work. Should any part of the
+License for any reason be judged legally invalid or ineffective under
+applicable law, such partial invalidity or ineffectiveness shall not
+invalidate the remainder of the License, and in such case Affirmer hereby
+affirms that he or she will not (i) exercise any of his or her remaining
+Copyright and Related Rights in the Work or (ii) assert any associated claims
+and causes of action with respect to the Work, in either case contrary to
+Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+
+ b. Affirmer offers the Work as-is and makes no representations or warranties
+ of any kind concerning the Work, express, implied, statutory or otherwise,
+ including without limitation warranties of title, merchantability, fitness
+ for a particular purpose, non infringement, or the absence of latent or
+ other defects, accuracy, or the present or absence of errors, whether or not
+ discoverable, all to the greatest extent permissible under applicable law.
+
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without limitation
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
+ disclaims responsibility for obtaining any necessary consents, permissions
+ or other rights required for any use of the Work.
+
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to this
+ CC0 or use of the Work.
+
+For more information, please see
+<http://creativecommons.org/publicdomain/zero/1.0/>
diff --git a/hash/LICENSE b/hash/LICENSE
new file mode 100644
index 00000000000..670154e3538
--- /dev/null
+++ b/hash/LICENSE
@@ -0,0 +1,116 @@
+CC0 1.0 Universal
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific
+works ("Commons") that the public can reliably and without fear of later
+claims of infringement build upon, modify, incorporate in other works, reuse
+and redistribute as freely as possible in any form whatsoever and for any
+purposes, including without limitation commercial purposes. These owners may
+contribute to the Commons to promote the ideal of a free culture and the
+further production of creative, cultural and scientific works, or to gain
+reputation or greater distribution for their Work in part through the use and
+efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation
+of additional consideration or compensation, the person associating CC0 with a
+Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+and publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not limited
+to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
+ and translate a Work;
+
+ ii. moral rights retained by the original author(s) and/or performer(s);
+
+ iii. publicity and privacy rights pertaining to a person's image or likeness
+ depicted in a Work;
+
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+
+ v. rights protecting the extraction, dissemination, use and reuse of data in
+ a Work;
+
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation thereof,
+ including any amended or successor version of such directive); and
+
+ vii. other similar, equivalent or corresponding rights throughout the world
+ based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer's heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free,
+non transferable, non sublicensable, non exclusive, irrevocable and
+unconditional license to exercise Affirmer's Copyright and Related Rights in
+the Work (i) in all territories worldwide, (ii) for the maximum duration
+provided by applicable law or treaty (including future time extensions), (iii)
+in any current or future medium and for any number of copies, and (iv) for any
+purpose whatsoever, including without limitation commercial, advertising or
+promotional purposes (the "License"). The License shall be deemed effective as
+of the date CC0 was applied by Affirmer to the Work. Should any part of the
+License for any reason be judged legally invalid or ineffective under
+applicable law, such partial invalidity or ineffectiveness shall not
+invalidate the remainder of the License, and in such case Affirmer hereby
+affirms that he or she will not (i) exercise any of his or her remaining
+Copyright and Related Rights in the Work or (ii) assert any associated claims
+and causes of action with respect to the Work, in either case contrary to
+Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+
+ b. Affirmer offers the Work as-is and makes no representations or warranties
+ of any kind concerning the Work, express, implied, statutory or otherwise,
+ including without limitation warranties of title, merchantability, fitness
+ for a particular purpose, non infringement, or the absence of latent or
+ other defects, accuracy, or the present or absence of errors, whether or not
+ discoverable, all to the greatest extent permissible under applicable law.
+
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without limitation
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
+ disclaims responsibility for obtaining any necessary consents, permissions
+ or other rights required for any use of the Work.
+
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to this
+ CC0 or use of the Work.
+
+For more information, please see
+<http://creativecommons.org/publicdomain/zero/1.0/>
diff --git a/hash/README.md b/hash/README.md
new file mode 100644
index 00000000000..85b1e7d400c
--- /dev/null
+++ b/hash/README.md
@@ -0,0 +1,6 @@
+# **Software Lists** #
+
+Software lists are containing meta-data of software for computers and consoles and are comming from various sources,
+they are not compiled in code but use as valuable source of information in order to preserve and document software.
+
+Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file
diff --git a/hash/ibm5170.xml b/hash/ibm5170.xml
index f285356df25..97514572d73 100644
--- a/hash/ibm5170.xml
+++ b/hash/ibm5170.xml
@@ -3092,6 +3092,26 @@ Missing files come here
</part>
</software>
+ <software name="sicmouse">
+ <description>SICOS Mouse</description>
+ <year>1990</year>
+ <publisher>SICOS</publisher>
+
+ <part name="flop1" interface="floppy_5_25">
+ <feature name="part_id" value="SICOS\nMOUSE DRIVER\nMOUSE TESTER\nMENU MAKER"/>
+ <dataarea name="flop" size="368640">
+ <rom name="sicos_mouse.img" size="368640" crc="3f927fd3" sha1="f1372c69d5d497ca6f3ce85ec144b714dfb2ab94" offset="0" />
+ </dataarea>
+ </part>
+
+ <part name="flop2" interface="floppy_5_25">
+ <feature name="part_id" value="SICOS PAINT\nThe SICOS mouse - paint program"/>
+ <dataarea name="flop" size="368640">
+ <rom name="sicos_paint.img" size="368640" crc="b93dd558" sha1="3e78a30acf4adddbabb04babdc469b5c4ff4af4a" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="3c90xed">
<description>3Com 3c90x Etherlink Drivers</description>
<year>1999</year>
diff --git a/keymaps/LICENSE b/keymaps/LICENSE
new file mode 100644
index 00000000000..670154e3538
--- /dev/null
+++ b/keymaps/LICENSE
@@ -0,0 +1,116 @@
+CC0 1.0 Universal
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific
+works ("Commons") that the public can reliably and without fear of later
+claims of infringement build upon, modify, incorporate in other works, reuse
+and redistribute as freely as possible in any form whatsoever and for any
+purposes, including without limitation commercial purposes. These owners may
+contribute to the Commons to promote the ideal of a free culture and the
+further production of creative, cultural and scientific works, or to gain
+reputation or greater distribution for their Work in part through the use and
+efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation
+of additional consideration or compensation, the person associating CC0 with a
+Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+and publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not limited
+to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
+ and translate a Work;
+
+ ii. moral rights retained by the original author(s) and/or performer(s);
+
+ iii. publicity and privacy rights pertaining to a person's image or likeness
+ depicted in a Work;
+
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+
+ v. rights protecting the extraction, dissemination, use and reuse of data in
+ a Work;
+
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation thereof,
+ including any amended or successor version of such directive); and
+
+ vii. other similar, equivalent or corresponding rights throughout the world
+ based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer's heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free,
+non transferable, non sublicensable, non exclusive, irrevocable and
+unconditional license to exercise Affirmer's Copyright and Related Rights in
+the Work (i) in all territories worldwide, (ii) for the maximum duration
+provided by applicable law or treaty (including future time extensions), (iii)
+in any current or future medium and for any number of copies, and (iv) for any
+purpose whatsoever, including without limitation commercial, advertising or
+promotional purposes (the "License"). The License shall be deemed effective as
+of the date CC0 was applied by Affirmer to the Work. Should any part of the
+License for any reason be judged legally invalid or ineffective under
+applicable law, such partial invalidity or ineffectiveness shall not
+invalidate the remainder of the License, and in such case Affirmer hereby
+affirms that he or she will not (i) exercise any of his or her remaining
+Copyright and Related Rights in the Work or (ii) assert any associated claims
+and causes of action with respect to the Work, in either case contrary to
+Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+
+ b. Affirmer offers the Work as-is and makes no representations or warranties
+ of any kind concerning the Work, express, implied, statutory or otherwise,
+ including without limitation warranties of title, merchantability, fitness
+ for a particular purpose, non infringement, or the absence of latent or
+ other defects, accuracy, or the present or absence of errors, whether or not
+ discoverable, all to the greatest extent permissible under applicable law.
+
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without limitation
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
+ disclaims responsibility for obtaining any necessary consents, permissions
+ or other rights required for any use of the Work.
+
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to this
+ CC0 or use of the Work.
+
+For more information, please see
+<http://creativecommons.org/publicdomain/zero/1.0/>
diff --git a/keymaps/README.md b/keymaps/README.md
new file mode 100644
index 00000000000..f38fc2492d4
--- /dev/null
+++ b/keymaps/README.md
@@ -0,0 +1,6 @@
+# **Keymaps** #
+
+Keymap files are definiton files for mapping different keyboard layouts to MAME input system, and are
+product of work of many different contributors.
+
+Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file
diff --git a/language/Afrikaans/strings.po b/language/Afrikaans/strings.po
index 3b960ab206f..9c00a601e40 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -551,11 +551,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -570,28 +567,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Albanian/strings.po b/language/Albanian/strings.po
index fbae192b797..d3e6fc4b5fc 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -551,11 +551,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -570,28 +567,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Arabic/strings.po b/language/Arabic/strings.po
index 53c0e7e074b..e951ad31025 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -551,11 +551,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -570,28 +567,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Basque/strings.po b/language/Basque/strings.po
index 7cb23d090a1..e13bbcd8284 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Belarusian/strings.po b/language/Belarusian/strings.po
index dc8e0a8cb1f..71fcf13930b 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -554,11 +554,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -573,28 +570,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Bosnian/strings.po b/language/Bosnian/strings.po
index 2428dd20c38..7af4f2d59cf 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -551,11 +551,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -570,28 +567,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Bulgarian/strings.po b/language/Bulgarian/strings.po
index f84ae8b55f5..31f639d6129 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Burmese/strings.po b/language/Burmese/strings.po
index 46e7745886c..857c7cf9588 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -551,11 +551,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -570,28 +567,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Catalan/strings.po b/language/Catalan/strings.po
index b12a2d43477..ff1a238b28a 100644
--- a/language/Catalan/strings.po
+++ b/language/Catalan/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Chinese_Simplified/strings.po b/language/Chinese_Simplified/strings.po
index e0b6054fb49..30f4844221e 100644
--- a/language/Chinese_Simplified/strings.po
+++ b/language/Chinese_Simplified/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-29 10:10+0800\n"
"Last-Translator: YuiFAN\n"
"Language-Team: MAME Language Team\n"
@@ -554,12 +554,9 @@ msgid "Folders Setup"
msgstr "文件夹设定"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "现有 "
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " 文件夹"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -573,29 +570,24 @@ msgstr "新增文件夹"
msgid "Remove Folder"
msgstr "移除文件夹"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr " 变更)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "新增"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " 文件夹 - 搜寻: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "按下 TAB 键设定"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "移除 "
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " 文件夹"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
@@ -2078,5 +2070,26 @@ msgstr " 色彩"
msgid " PENS"
msgstr " PENS"
+#~ msgid "Current "
+#~ msgstr "现有 "
+
+#~ msgid " Folders"
+#~ msgstr " 文件夹"
+
+#~ msgid "Change)"
+#~ msgstr " 变更)"
+
+#~ msgid "Add"
+#~ msgstr "新增"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " 文件夹 - 搜寻: "
+
+#~ msgid "Remove "
+#~ msgstr "移除 "
+
+#~ msgid " Folder"
+#~ msgstr " 文件夹"
+
#~ msgid "Search: "
#~ msgstr "搜寻: "
diff --git a/language/Chinese_Traditional/strings.po b/language/Chinese_Traditional/strings.po
index dc0158813d3..440ff3dc133 100644
--- a/language/Chinese_Traditional/strings.po
+++ b/language/Chinese_Traditional/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-29 09:45+0800\n"
"Last-Translator: YuiFAN\n"
"Language-Team: MAME Language Team\n"
@@ -554,12 +554,9 @@ msgid "Folders Setup"
msgstr "資料夾設定"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "現有 "
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " 資料夾"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -573,29 +570,24 @@ msgstr "新增資料夾"
msgid "Remove Folder"
msgstr "移除資料夾"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "變更)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "新增"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " 資料夾 - 搜尋: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "按下 TAB 鍵設定"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "移除 "
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " 資料夾"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
@@ -2077,3 +2069,24 @@ msgstr " 色彩"
#: src/emu/ui/viewgfx.cpp:391
msgid " PENS"
msgstr " PENS"
+
+#~ msgid "Current "
+#~ msgstr "現有 "
+
+#~ msgid " Folders"
+#~ msgstr " 資料夾"
+
+#~ msgid "Change)"
+#~ msgstr "變更)"
+
+#~ msgid "Add"
+#~ msgstr "新增"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " 資料夾 - 搜尋: "
+
+#~ msgid "Remove "
+#~ msgstr "移除 "
+
+#~ msgid " Folder"
+#~ msgstr " 資料夾"
diff --git a/language/Croatian/strings.po b/language/Croatian/strings.po
index f7db0380557..75e8f6809a9 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Czech/strings.po b/language/Czech/strings.po
index f7e40f63918..089bf6e8f5e 100644
--- a/language/Czech/strings.po
+++ b/language/Czech/strings.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Danish/strings.po b/language/Danish/strings.po
index 332cfabaa32..35dfce88486 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Dutch/strings.po b/language/Dutch/strings.po
index ea72c7c2904..05233f048b1 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/English/strings.po b/language/English/strings.po
index 1272932ab4a..37e5117f4c9 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Estonian/strings.po b/language/Estonian/strings.po
index 842b8a55577..983850d25b0 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Finnish/strings.po b/language/Finnish/strings.po
index 6150f447a0a..7c37fc217e9 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/French/strings.po b/language/French/strings.po
index fb67ffbf58b..8b49fb806e2 100644
--- a/language/French/strings.po
+++ b/language/French/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: Benjamin Siskoo\n"
@@ -557,12 +557,9 @@ msgid "Folders Setup"
msgstr "Configurer les Dossiers"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "En cours "
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " Dossiers"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -576,29 +573,24 @@ msgstr "Ajouter un Dossier"
msgid "Remove Folder"
msgstr "Enlever le Dossier"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "Changer)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "Ajouter"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " Dossier - Rechercher : "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "Presser TAB pour choisir"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "Enlever "
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " Dossier"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
@@ -2093,6 +2085,27 @@ msgstr " COULEURS"
msgid " PENS"
msgstr " PENS"
+#~ msgid "Current "
+#~ msgstr "En cours "
+
+#~ msgid " Folders"
+#~ msgstr " Dossiers"
+
+#~ msgid "Change)"
+#~ msgstr "Changer)"
+
+#~ msgid "Add"
+#~ msgstr "Ajouter"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " Dossier - Rechercher : "
+
+#~ msgid "Remove "
+#~ msgstr "Enlever "
+
+#~ msgid " Folder"
+#~ msgstr " Dossier"
+
#~ msgid " Search: "
#~ msgstr " Rechercher :"
diff --git a/language/French_Belgium/strings.po b/language/French_Belgium/strings.po
index 53e6fb8a6c6..ae5f0bd29a2 100644
--- a/language/French_Belgium/strings.po
+++ b/language/French_Belgium/strings.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-02 07:55+0100\n"
-"PO-Revision-Date: 2016-03-01 19:37+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
+"PO-Revision-Date: 2016-03-02 18:52+0100\n"
"Last-Translator: Mevi <mevi.mame@gmail.com>\n"
"Language-Team: MAME Language Team\n"
"Language: fr_BE\n"
@@ -31,7 +31,7 @@ msgstr "Entrer un code"
#: src/emu/ui/barcode.cpp:118
msgid "Barcode length invalid!"
-msgstr "Longueur du code-barres non valide!"
+msgstr "Longueur du code-barres non valide !"
#: src/emu/ui/cheatopt.cpp:77
#, c-format
@@ -52,11 +52,11 @@ msgstr "Paramètres du tir automatique"
#: src/emu/ui/cheatopt.cpp:139
msgid "Reset All"
-msgstr "Réinitialiser tout"
+msgstr "Tout réinitialiser"
#: src/emu/ui/cheatopt.cpp:142
msgid "Reload All"
-msgstr "Recharger tout"
+msgstr "Tout recharger"
#: src/emu/ui/cheatopt.cpp:258
msgid "Autofire Status"
@@ -90,11 +90,11 @@ msgstr "Inactif"
#: src/emu/ui/cheatopt.cpp:301
msgid "No buttons found on this machine!"
-msgstr "Aucun bouton trouvé sur cette machine!"
+msgstr "Aucun bouton trouvé sur cette machine !"
#: src/emu/ui/cheatopt.cpp:312 src/emu/ui/cheatopt.cpp:316
msgid "Autofire Delay"
-msgstr "Retard du tir automatique"
+msgstr "Attente du tir automatique"
#: src/emu/ui/ctrlmenu.cpp:20
msgid "Lightgun Device Assignment"
@@ -131,7 +131,7 @@ msgstr "Affecter au périphérique Souris"
#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
#: src/emu/ui/optsmenu.cpp:268
msgid "Device Mapping"
-msgstr "Définir le périphérique"
+msgstr "Mappage des périphériques"
#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
msgid "Main filter"
@@ -143,7 +143,7 @@ msgstr "Autre filtre"
#: src/emu/ui/custmenu.cpp:174 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
-msgstr "^!Fabricant"
+msgstr "^!Constructeur"
#: src/emu/ui/custmenu.cpp:183 src/emu/ui/custmenu.cpp:468
#: src/emu/ui/optsmenu.cpp:247
@@ -181,7 +181,7 @@ msgstr "^!Région"
#: src/emu/ui/custui.cpp:20
msgid "Show All"
-msgstr "Afficher tout"
+msgstr "Tout afficher"
#: src/emu/ui/custui.cpp:21
msgid "Hide Filters"
@@ -189,7 +189,7 @@ msgstr "Cacher les filtres"
#: src/emu/ui/custui.cpp:22
msgid "Hide Info/Image"
-msgstr "Cacher Info/Image"
+msgstr "Cacher Images/Infos"
#: src/emu/ui/custui.cpp:23
msgid "Hide Both"
@@ -209,7 +209,7 @@ msgstr "Langue"
#: src/emu/ui/custui.cpp:149
msgid "Show side panels"
-msgstr "Afficher les side panels"
+msgstr "Afficher les panneaux latéraux"
#: src/emu/ui/custui.cpp:164 src/emu/ui/custui.cpp:184
msgid "Custom UI Settings"
@@ -237,7 +237,7 @@ msgstr "Lignes"
#: src/emu/ui/custui.cpp:387
msgid "Infos text size"
-msgstr "Taille du texte Infos"
+msgstr "Taille du texte des infos"
#: src/emu/ui/custui.cpp:404
msgid "UI Fonts Settings"
@@ -330,7 +330,7 @@ msgstr " pour changer la valeur de la couleur"
#: src/emu/ui/custui.cpp:617
msgid "Menu Preview"
-msgstr "Prévisualiser le menu"
+msgstr "Aperçu du menu"
#: src/emu/ui/custui.cpp:625
msgid "Normal"
@@ -377,7 +377,7 @@ msgstr " - Paramètres ARVB"
#: src/emu/ui/custui.cpp:930
msgid "Color preview ="
-msgstr "Couleur prévisualisée ="
+msgstr "Aperçu de la couleur ="
#: src/emu/ui/custui.cpp:1026
msgid "White"
@@ -417,34 +417,34 @@ msgstr "Utilisation du logiciel"
#: src/emu/ui/datmenu.cpp:195
msgid "Revision: "
-msgstr "Révision :"
+msgstr "Révision : "
#: src/emu/ui/datmenu.cpp:287 src/emu/ui/selgame.cpp:39
#: src/emu/ui/selgame.cpp:2127 src/emu/ui/selgame.cpp:2136
#: src/emu/ui/selsoft.cpp:1565 src/emu/ui/selsoft.cpp:1583
#: src/emu/ui/selsoft.cpp:1592
msgid "History"
-msgstr ""
+msgstr "Aperçu history.dat"
#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:40
msgid "Mameinfo"
-msgstr ""
+msgstr "Aperçu mameinfo.dat"
#: src/emu/ui/datmenu.cpp:291 src/emu/ui/selgame.cpp:42
msgid "Messinfo"
-msgstr ""
+msgstr "Aperçu messinfo.dat"
#: src/emu/ui/datmenu.cpp:293 src/emu/ui/selgame.cpp:41
msgid "Sysinfo"
-msgstr ""
+msgstr "Aperçu sysinfo.dat"
#: src/emu/ui/datmenu.cpp:295 src/emu/ui/selgame.cpp:44
msgid "Mamescore"
-msgstr ""
+msgstr "Aperçu story.dat (MAMESCORE)"
#: src/emu/ui/datmenu.cpp:297 src/emu/ui/selgame.cpp:43
msgid "Command"
-msgstr ""
+msgstr "Aperçu command.dat"
#: src/emu/ui/dirmenu.cpp:31
msgid "ROMs"
@@ -452,7 +452,7 @@ msgstr ""
#: src/emu/ui/dirmenu.cpp:32
msgid "UI"
-msgstr ""
+msgstr "UI (Interface utilisateur)"
#: src/emu/ui/dirmenu.cpp:34
msgid "Samples"
@@ -460,47 +460,47 @@ msgstr ""
#: src/emu/ui/dirmenu.cpp:35
msgid "DATs"
-msgstr ""
+msgstr "Fichiers DAT"
#: src/emu/ui/dirmenu.cpp:36
msgid "INIs"
-msgstr ""
+msgstr "Fichiers INI"
#: src/emu/ui/dirmenu.cpp:37
msgid "Extra INIs"
-msgstr ""
+msgstr "Fichiers INI supplémentaires"
#: src/emu/ui/dirmenu.cpp:38
msgid "Icons"
-msgstr ""
+msgstr "Icônes"
#: src/emu/ui/dirmenu.cpp:39 src/emu/ui/miscmenu.cpp:560
msgid "Cheats"
-msgstr ""
+msgstr "Cheats (Codes de triche)"
#: src/emu/ui/dirmenu.cpp:40 src/emu/ui/menu.cpp:43
msgid "Snapshots"
-msgstr ""
+msgstr "Snapshots (Captures d'écran)"
#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
msgid "Cabinets"
-msgstr ""
+msgstr "Cabinets (Bornes)"
#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
msgid "Flyers"
-msgstr ""
+msgstr "Flyers (Prospectus)"
#: src/emu/ui/dirmenu.cpp:43 src/emu/ui/menu.cpp:48
msgid "Titles"
-msgstr ""
+msgstr "Titles (Écrans-titre)"
#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
msgid "Ends"
-msgstr ""
+msgstr "Ends (Fins de jeu)"
#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
msgid "PCBs"
-msgstr ""
+msgstr "PCBs (Circuits imprimés)"
#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
msgid "Marquees"
@@ -508,27 +508,27 @@ msgstr ""
#: src/emu/ui/dirmenu.cpp:47
msgid "Controls Panels"
-msgstr "Control Panels"
+msgstr "Control Panels (Panneaux de contrôle)"
#: src/emu/ui/dirmenu.cpp:48
msgid "Crosshairs"
-msgstr ""
+msgstr "Crosshairs (Viseurs)"
#: src/emu/ui/dirmenu.cpp:49
msgid "Artworks"
-msgstr ""
+msgstr "Artworks (Illustrations)"
#: src/emu/ui/dirmenu.cpp:50 src/emu/ui/menu.cpp:51
msgid "Bosses"
-msgstr ""
+msgstr "Bosses (Ennemis et adversaires)"
#: src/emu/ui/dirmenu.cpp:51
msgid "Artworks Preview"
-msgstr ""
+msgstr "Artworks Preview (Aperçu)"
#: src/emu/ui/dirmenu.cpp:52 src/emu/ui/menu.cpp:57
msgid "Select"
-msgstr ""
+msgstr "Select (Écran de sélection)"
#: src/emu/ui/dirmenu.cpp:53
msgid "GameOver"
@@ -536,7 +536,7 @@ msgstr ""
#: src/emu/ui/dirmenu.cpp:54 src/emu/ui/menu.cpp:55
msgid "HowTo"
-msgstr ""
+msgstr "HowTo (Comment faire)"
#: src/emu/ui/dirmenu.cpp:55 src/emu/ui/menu.cpp:52
msgid "Logos"
@@ -555,12 +555,9 @@ msgid "Folders Setup"
msgstr "Configuration des dossiers"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "Actuel "
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " dossiers"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -574,29 +571,24 @@ msgstr "Ajouter un dossier"
msgid "Remove Folder"
msgstr "Supprimer un dossier"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "Changer)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "Ajouter"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " Dossier - Recherche :"
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "Appuyer sur TAB pour définir"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "Supprimer "
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " Dossier"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
@@ -636,7 +628,7 @@ msgstr "Mode fenêtré"
#: src/emu/ui/dsplmenu.cpp:49
msgid "Enforce Aspect Ratio"
-msgstr "Forcer le format d'affichage"
+msgstr "Respecter le ratio d'affichage"
#: src/emu/ui/dsplmenu.cpp:50
msgid "Start Out Maximized"
@@ -657,7 +649,7 @@ msgstr "Options d'affichage"
#: src/emu/ui/filesel.cpp:159
msgid "File Already Exists - Override?"
-msgstr "Ce fichier existe déjà - Écraser?"
+msgstr "Ce fichier existe déjà - Écraser ?"
#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1552
#: src/emu/ui/selgame.cpp:1553 src/emu/ui/selgame.cpp:1554
@@ -761,7 +753,7 @@ msgstr "[échoué]"
#: src/emu/ui/inputmap.cpp:52
msgid "User Interface"
-msgstr "Interface utilisateur"
+msgstr "Interface"
#: src/emu/ui/inputmap.cpp:59
msgid "Other Controls"
@@ -866,11 +858,11 @@ msgstr "Sélectionner une nouvelle machine"
#: src/emu/ui/menu.cpp:45
msgid "Control Panels"
-msgstr ""
+msgstr "Control Panels (Commandes)"
#: src/emu/ui/menu.cpp:50
msgid "Artwork Preview"
-msgstr ""
+msgstr "Aperçu de l'artwork"
#: src/emu/ui/menu.cpp:54
msgid "Game Over"
@@ -890,11 +882,11 @@ msgstr "Afficher vue des fichiers DATs"
#: src/emu/ui/menu.cpp:252
msgid "Return to Machine"
-msgstr ""
+msgstr "Retour à la machine actuelle"
#: src/emu/ui/menu.cpp:256 src/emu/ui/menu.cpp:258
msgid "Exit"
-msgstr "Quitter MAME"
+msgstr "Quitter"
#: src/emu/ui/menu.cpp:263 src/emu/ui/menu.cpp:265
msgid "Return to Previous Menu"
@@ -953,12 +945,12 @@ msgstr ""
#: src/emu/ui/miscmenu.cpp:256
msgid "Coin %1$c: NA%3$s\n"
-msgstr "Monnaie %1$c : ND%3$s\n"
+msgstr "Monnayeur %1$c : ND%3$s\n"
#: src/emu/ui/miscmenu.cpp:256
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
-msgstr "Monnaie %1$c : %2$d%3$s\n"
+msgstr "Monnayeur %1$c : %2$d%3$s\n"
#: src/emu/ui/miscmenu.cpp:259
msgid " (locked)"
@@ -966,7 +958,7 @@ msgstr " (verrouillé)"
#: src/emu/ui/miscmenu.cpp:518
msgid "Visible Delay"
-msgstr "Retard visible"
+msgstr "Attente visible"
#: src/emu/ui/miscmenu.cpp:557
msgid "Re-select last machine played"
@@ -998,7 +990,7 @@ msgstr "Forcer l'aspect 4:3 pour la capture d'écran"
#: src/emu/ui/miscmenu.cpp:565
msgid "Use image as background"
-msgstr "Utiliser une image de fond"
+msgstr "Utiliser l'image comme fond d'écran"
#: src/emu/ui/miscmenu.cpp:566
msgid "Skip bios selection menu"
@@ -1147,7 +1139,7 @@ msgid ""
"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 sélectionner une machine différente.\n"
+"cette machine. Veuillez en sélectionner une autre.\n"
"\n"
"Appuyez sur une touche (excepté ESC) pour continuer."
@@ -1284,7 +1276,7 @@ msgstr "Année : %1$s\n"
#: src/emu/ui/selgame.cpp:1521
#, c-format
msgid "Manufacturer: %1$-.100s\n"
-msgstr "Fabricant : %1$-.100s\n"
+msgstr "Constructeur : %1$-.100s\n"
#: src/emu/ui/selgame.cpp:1525
#, c-format
@@ -1369,7 +1361,7 @@ msgstr "Supporte les sauvegardes : %1$s\n"
#: src/emu/ui/selgame.cpp:1559
#, c-format
msgid "Screen Orentation: %1$s\n"
-msgstr ""
+msgstr "Orientation de l'écran: %1$s\n"
#: src/emu/ui/selgame.cpp:1559
msgid "Vertical"
@@ -1433,7 +1425,7 @@ msgid ""
"Press any key (except ESC) to continue."
msgstr ""
"Il manque un ou plusieurs fichiers nécessaires à l'utilisation de ce "
-"logiciel. Veuillez sélectionner un logiciel différent.\n"
+"logiciel. Veuillez en sélectionner un autre.\n"
"\n"
"Appuyez sur une touche (excepté ESC) pour continuer."
@@ -1445,7 +1437,7 @@ msgstr "%1$s %2$s ( %3$d / %4$d logiciels )"
#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "Driver: \"%1$s\" software list "
-msgstr "Driver : \"%1$s\" liste de logiciels "
+msgstr "Liste de logiciels pour le driver : \"%1$s\" "
#: src/emu/ui/selsoft.cpp:687
#, c-format
@@ -1547,7 +1539,7 @@ msgstr "Son"
#: src/emu/ui/sndmenu.cpp:135
msgid "Sample Rate"
-msgstr "Niveau d'échantillonnage"
+msgstr "Fréquence d'échantillonnage"
#: src/emu/ui/sndmenu.cpp:136
msgid "Use External Samples"
@@ -1564,7 +1556,8 @@ msgstr "Permuter l'ordre des éléments"
#: src/emu/ui/swlist.cpp:268
#, c-format
msgid "Switched Order: entries now ordered by %s"
-msgstr "Commande de tri effectuée : les entrées sont maintenant classés par %s"
+msgstr ""
+"Commande de tri effectuée : les entrées sont maintenant classées par %s"
#: src/emu/ui/swlist.cpp:268
msgid "shortname"
@@ -1584,7 +1577,7 @@ msgstr "arrêté"
#: src/emu/ui/tapectrl.cpp:86
msgid "playing"
-msgstr "En cours de lecture"
+msgstr "en cours de lecture"
#: src/emu/ui/tapectrl.cpp:86
msgid "(playing)"
@@ -1592,7 +1585,7 @@ msgstr "(en cours de lecture)"
#: src/emu/ui/tapectrl.cpp:87
msgid "recording"
-msgstr "En cours d'enregistrement"
+msgstr "en cours d'enregistrement"
#: src/emu/ui/tapectrl.cpp:87
msgid "(recording)"
@@ -1621,7 +1614,7 @@ msgstr ""
#: src/emu/ui/ui.cpp:415
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 "
+"Ce driver nécessite le chargement d'images dans le(s) périphérique(s) "
"suivant(s) : "
#: src/emu/ui/ui.cpp:1043
@@ -1657,7 +1650,7 @@ msgid ""
"There are known problems with this machine\n"
"\n"
msgstr ""
-"On rencontre les problèmes suivants avec cette machine\n"
+"On rencontre les problèmes suivants avec cette machine :\n"
"\n"
#: src/emu/ui/ui.cpp:1098
@@ -1781,7 +1774,7 @@ msgstr ""
"%2$s %3$s\n"
"Driver : %4$s\n"
"\n"
-"CPU :\n"
+"Processeur :\n"
#: src/emu/ui/ui.cpp:1228 src/emu/ui/ui.cpp:1267
msgid "MHz"
@@ -1813,7 +1806,7 @@ msgstr "Aucun\n"
#: src/emu/ui/ui.cpp:1282
msgid "Vector"
-msgstr ""
+msgstr "Vecteur"
#: src/emu/ui/ui.cpp:1293
#, c-format
@@ -1854,11 +1847,11 @@ msgstr "Le tir automatique ne peut pas être activé"
#: src/emu/ui/ui.cpp:1775
msgid "Select position to save to"
-msgstr "Sélectionner la position de la sauvegarde"
+msgstr "Sauvegarder à la position"
#: src/emu/ui/ui.cpp:1777
msgid "Select position to load from"
-msgstr "Sélectionner la position du chargement"
+msgstr "Charger depuis la position"
#: src/emu/ui/ui.cpp:1801
msgid "Save cancelled"
@@ -1871,12 +1864,12 @@ msgstr "Chargement annulé"
#: src/emu/ui/ui.cpp:1846
#, c-format
msgid "Save to position %s"
-msgstr "Sauvegarder à la position %s"
+msgstr "Sauvegarde à la position %s"
#: src/emu/ui/ui.cpp:1851
#, c-format
msgid "Load from position %s"
-msgstr "Charger depuis la position %s"
+msgstr "Chargement depuis la position %s"
#: src/emu/ui/ui.cpp:1891
#, c-format
@@ -1886,24 +1879,24 @@ msgid ""
"Press ''%1$s'' to quit,\n"
"Press ''%2$s'' to return to emulation."
msgstr ""
-"Êtes-vous certain de vouloir quitter?\n"
+"Êtes-vous certain de vouloir quitter ?\n"
"\n"
"Appuyez sur ''%1$s'' pour quitter,\n"
"Appuyez sur ''%2$s'' pour retourner à l'émulation."
#: src/emu/ui/ui.cpp:1967
msgid "Master Volume"
-msgstr ""
+msgstr "Volume principal"
#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Volume"
-msgstr ""
+msgstr "Volume %1$s"
#: src/emu/ui/ui.cpp:1999
#, c-format
msgid "Overclock CPU %1$s"
-msgstr ""
+msgstr "Overclock du processeur %1$s"
#: src/emu/ui/ui.cpp:2019
#, c-format
@@ -1948,43 +1941,43 @@ msgstr "%1$s - Position Verticale"
#: src/emu/ui/ui.cpp:2063
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
-msgstr "Laserdisc '%1$s' Stretch Horizontal"
+msgstr "'%1$s' Laserdisc - Stretch Horizontal"
#: src/emu/ui/ui.cpp:2066
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
-msgstr "Laserdisc '%1$s' Position Horizontal"
+msgstr "'%1$s' Laserdisc - Position Horizontale"
#: src/emu/ui/ui.cpp:2069
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
-msgstr "Laserdisc '%1$s' Stretch Vertical"
+msgstr "'%1$s' Laserdisc - Stretch Vertical"
#: src/emu/ui/ui.cpp:2072
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
-msgstr "Laserdisc '%1$s' Position Verticale"
+msgstr "'%1$s' Laserdisc - Position Verticale"
#: src/emu/ui/ui.cpp:2081
msgid "Vector Flicker"
-msgstr ""
+msgstr "Vector Flicker (Scintillement)"
#: src/emu/ui/ui.cpp:2083
msgid "Beam Width Minimum"
-msgstr ""
+msgstr "Largeur de rayon minimum"
#: src/emu/ui/ui.cpp:2085
msgid "Beam Width Maximum"
-msgstr ""
+msgstr "Largeur de rayon maximum"
#: src/emu/ui/ui.cpp:2087
msgid "Beam Intensity Weight"
-msgstr ""
+msgstr "Intensité du rayon"
#: src/emu/ui/ui.cpp:2099
#, c-format
msgid "Crosshair Scale %1$s"
-msgstr ""
+msgstr "Viseur - Échelle %1$s"
#: src/emu/ui/ui.cpp:2099 src/emu/ui/ui.cpp:2102
msgid "X"
@@ -1997,7 +1990,7 @@ msgstr ""
#: src/emu/ui/ui.cpp:2102
#, c-format
msgid "Crosshair Offset %1$s"
-msgstr ""
+msgstr "Viseur - Offset %1$s"
#: src/emu/ui/ui.cpp:2121
#, c-format
@@ -2045,22 +2038,22 @@ msgstr "Écran"
#: src/emu/ui/ui.cpp:2544
#, c-format
msgid "Crosshair Scale X %1$1.3f"
-msgstr ""
+msgstr "Viseur - Échelle X %1$1.3f"
#: src/emu/ui/ui.cpp:2544
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
-msgstr ""
+msgstr "Viseur - Échelle Y %1$1.3f"
#: src/emu/ui/ui.cpp:2563
#, c-format
msgid "Crosshair Offset X %1$1.3f"
-msgstr ""
+msgstr "Viseur - Offset X %1$1.3f"
#: src/emu/ui/ui.cpp:2563
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
-msgstr ""
+msgstr "Viseur - Offset Y %1$1.3f"
#: src/emu/ui/videoopt.cpp:55
#, c-format
@@ -2073,19 +2066,19 @@ msgstr "Rotation"
#: src/emu/ui/videoopt.cpp:207
msgid "Backdrops"
-msgstr ""
+msgstr "Backdrops (Fonds)"
#: src/emu/ui/videoopt.cpp:211
msgid "Overlays"
-msgstr ""
+msgstr "Overlays (Calques)"
#: src/emu/ui/videoopt.cpp:215
msgid "Bezels"
-msgstr ""
+msgstr "Bezels (Cadres)"
#: src/emu/ui/videoopt.cpp:219
msgid "CPanels"
-msgstr ""
+msgstr "CPanels (Commandes)"
#: src/emu/ui/videoopt.cpp:227
msgid "View"
@@ -2093,7 +2086,7 @@ msgstr "Vue"
#: src/emu/ui/videoopt.cpp:227
msgid "Cropped"
-msgstr "Rétrécie"
+msgstr "Tronquée"
#: src/emu/ui/videoopt.cpp:227
msgid "Full"
@@ -2107,5 +2100,23 @@ msgstr " COULEURS"
msgid " PENS"
msgstr " MARQUEURS"
-#~ msgid "Screen Orientation: %1$s\n"
-#~ msgstr "Orientation de l'écran : %1$s\n"
+#~ msgid "Current "
+#~ msgstr "Actuel "
+
+#~ msgid " Folders"
+#~ msgstr " dossiers"
+
+#~ msgid "Change)"
+#~ msgstr "Changer)"
+
+#~ msgid "Add"
+#~ msgstr "Ajouter"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " Dossier - Recherche : "
+
+#~ msgid "Remove "
+#~ msgstr "Supprimer "
+
+#~ msgid " Folder"
+#~ msgstr " Dossier"
diff --git a/language/French_Canada/strings.po b/language/French_Canada/strings.po
index 1ca3fea8622..946d87b55c7 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Georgian/strings.po b/language/Georgian/strings.po
index 7cdae3a3afb..9458a67ea48 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -551,11 +551,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -570,28 +567,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/German/strings.po b/language/German/strings.po
index af22b814139..aadeef2d9e3 100644
--- a/language/German/strings.po
+++ b/language/German/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-27 14:59+0100\n"
"Last-Translator: Lothar Serra Mari <scummvm@rootfather.de>\n"
"Language-Team: MAME Language Team\n"
@@ -557,12 +557,9 @@ msgid "Folders Setup"
msgstr "Ordnereinstellungen"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "Aktuelle "
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " Ordner"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -576,29 +573,24 @@ msgstr "Ordner hinzufügen"
msgid "Remove Folder"
msgstr "Ordner entfernen"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "Ändern)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "Hinzufügen"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " Ordner - Suche: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "Zum Setzen drücken Sie TAB"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "Entferne "
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " Ordner"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
@@ -2109,3 +2101,24 @@ msgstr " FARBEN"
#: src/emu/ui/viewgfx.cpp:391
msgid " PENS"
msgstr " STIFTE"
+
+#~ msgid "Current "
+#~ msgstr "Aktuelle "
+
+#~ msgid " Folders"
+#~ msgstr " Ordner"
+
+#~ msgid "Change)"
+#~ msgstr "Ändern)"
+
+#~ msgid "Add"
+#~ msgstr "Hinzufügen"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " Ordner - Suche: "
+
+#~ msgid "Remove "
+#~ msgstr "Entferne "
+
+#~ msgid " Folder"
+#~ msgstr " Ordner"
diff --git a/language/Greek/strings.po b/language/Greek/strings.po
index bf46c7fd12b..4914e4d4973 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-03-01 16:29+0200\n"
"Last-Translator: Mame.gr\n"
"Language-Team: MAME Language Team\n"
@@ -556,12 +556,9 @@ msgid "Folders Setup"
msgstr "Ρύθμιση φακέλων"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "Τρέχοντες "
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " Φάκελοι"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -575,29 +572,24 @@ msgstr "Προσθήκη φακέλου"
msgid "Remove Folder"
msgstr "Αφαίρεση φακέλου"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "Αλλαγή)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "Προσθήκη"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " Φάκελος - Αναζήτηση: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "Πιέστε το πλήκτρο TAB για να ορίσετε"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "Αφαίρεση"
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " Φάκελος"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
@@ -2112,3 +2104,24 @@ msgstr " ΧΡΩΜΑΤΑ"
#: src/emu/ui/viewgfx.cpp:391
msgid " PENS"
msgstr " ΓΡΑΦΙΔΕΣ"
+
+#~ msgid "Current "
+#~ msgstr "Τρέχοντες "
+
+#~ msgid " Folders"
+#~ msgstr " Φάκελοι"
+
+#~ msgid "Change)"
+#~ msgstr "Αλλαγή)"
+
+#~ msgid "Add"
+#~ msgstr "Προσθήκη"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " Φάκελος - Αναζήτηση: "
+
+#~ msgid "Remove "
+#~ msgstr "Αφαίρεση"
+
+#~ msgid " Folder"
+#~ msgstr " Φάκελος"
diff --git a/language/Hebrew/strings.po b/language/Hebrew/strings.po
index 91d1028a2ef..d5aeedfa55a 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Hindi/strings.po b/language/Hindi/strings.po
index 720e915af1d..d66d442c0c8 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -551,11 +551,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -570,28 +567,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Hungarian/strings.po b/language/Hungarian/strings.po
index 75862998335..26888df3366 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Indonesian/strings.po b/language/Indonesian/strings.po
index 42267467455..e504305235a 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Italian/strings.po b/language/Italian/strings.po
index 0438eae01f2..d3d1cf9f74c 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\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"
@@ -556,12 +556,9 @@ msgid "Folders Setup"
msgstr "Configura Cartelle"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "Attuale "
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " Cartelle"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -575,29 +572,24 @@ msgstr "Aggiungi Cartella"
msgid "Remove Folder"
msgstr "Rimuovi Cartella"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "Cambia)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "Aggiungi"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " Cartella - Cerca: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "Premi TAB per impostare"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "Rimuovi "
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " Cartella"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
@@ -2082,6 +2074,27 @@ msgstr " COLORI"
msgid " PENS"
msgstr " PEN"
+#~ msgid "Current "
+#~ msgstr "Attuale "
+
+#~ msgid " Folders"
+#~ msgstr " Cartelle"
+
+#~ msgid "Change)"
+#~ msgstr "Cambia)"
+
+#~ msgid "Add"
+#~ msgstr "Aggiungi"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " Cartella - Cerca: "
+
+#~ msgid "Remove "
+#~ msgstr "Rimuovi "
+
+#~ msgid " Folder"
+#~ msgstr " Cartella"
+
#~ msgid " Search: "
#~ msgstr " Cerca: "
diff --git a/language/Japanese/strings.po b/language/Japanese/strings.po
index e0360fc4d39..39d85a558fb 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-23 01:39+0900\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -144,7 +144,7 @@ msgstr "他のフィルタ"
#: src/emu/ui/custmenu.cpp:174 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
-msgstr ""
+msgstr "^!製造元"
#: src/emu/ui/custmenu.cpp:183 src/emu/ui/custmenu.cpp:468
#: src/emu/ui/optsmenu.cpp:247
@@ -374,7 +374,7 @@ msgstr "パレットから選ぶ"
#: src/emu/ui/custui.cpp:906
msgid " - ARGB Settings"
-msgstr " - ARGB設定"
+msgstr "のARGB設定"
#: src/emu/ui/custui.cpp:930
msgid "Color preview ="
@@ -556,12 +556,9 @@ msgid "Folders Setup"
msgstr "フォルダ設定"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "現在の"
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " フォルダ"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr "現在の%1$sフォルダ"
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -575,33 +572,28 @@ msgstr "フォルダを追加"
msgid "Remove Folder"
msgstr "フォルダを削除"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "変更)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "フォルダを"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr "%1$sフォルダを変更 〜 検索:%2$s_"
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " 追加 - 検索:"
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr "%1$sフォルダを追加 〜 検索:%2$s_"
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
-msgstr "TABを押して設定"
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "フォルダを"
+msgstr "TABキーを押して設定"
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " 削除する"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr "%1$sフォルダを削除"
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
-msgstr ""
+msgstr "ビデオモード"
#: src/emu/ui/dsplmenu.cpp:40
msgid "Hardware Stretch"
@@ -633,7 +625,7 @@ msgstr ""
#: src/emu/ui/dsplmenu.cpp:48
msgid "Window Mode"
-msgstr ""
+msgstr "ウィンドウモード"
#: src/emu/ui/dsplmenu.cpp:49
msgid "Enforce Aspect Ratio"
@@ -678,15 +670,15 @@ msgstr ""
#: src/emu/ui/filesel.cpp:271
msgid "New Image Name:"
-msgstr ""
+msgstr "新しいイメージ名:"
#: src/emu/ui/filesel.cpp:277
msgid "Image Format:"
-msgstr ""
+msgstr "イメージ形式:"
#: src/emu/ui/filesel.cpp:283
msgid "Create"
-msgstr ""
+msgstr "作成"
#: src/emu/ui/filesel.cpp:314
msgid "Please enter a file extension too"
@@ -694,23 +686,23 @@ msgstr ""
#: src/emu/ui/filesel.cpp:502 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
-msgstr ""
+msgstr "〔空のスロット〕"
#: src/emu/ui/filesel.cpp:506
msgid "[create]"
-msgstr ""
+msgstr "〔作成〕"
#: src/emu/ui/filesel.cpp:510 src/emu/ui/swlist.cpp:76
msgid "[software list]"
-msgstr "【ソフトウェアリスト】"
+msgstr "〔ソフトウェアリスト〕"
#: src/emu/ui/filesel.cpp:802
msgid "Select image format"
-msgstr ""
+msgstr "イメージ形式の選択"
#: src/emu/ui/filesel.cpp:862
msgid "Select access mode"
-msgstr ""
+msgstr "アクセスモードの選択"
#: src/emu/ui/filesel.cpp:863
msgid "Read-only"
@@ -718,7 +710,7 @@ msgstr "読み取り専用"
#: src/emu/ui/filesel.cpp:865
msgid "Read-write"
-msgstr ""
+msgstr "読み取り/書き込み"
#: src/emu/ui/filesel.cpp:866
msgid "Read this image, write to another image"
@@ -756,7 +748,7 @@ msgstr "擬似ターミナル"
#: src/emu/ui/info_pty.cpp:35
msgid "[failed]"
-msgstr ""
+msgstr "【失敗】"
#: src/emu/ui/inputmap.cpp:52
msgid "User Interface"
@@ -773,7 +765,7 @@ msgstr "リセット"
#: src/emu/ui/mainmenu.cpp:53
msgid "Input (general)"
-msgstr "入力(一般)"
+msgstr "入力(共通)"
#: src/emu/ui/mainmenu.cpp:55
msgid "Input (this Machine)"
@@ -885,7 +877,7 @@ msgstr ""
#: src/emu/ui/menu.cpp:65
msgid "Show DATs view"
-msgstr ""
+msgstr "DATビューを表示"
#: src/emu/ui/menu.cpp:252
msgid "Return to Machine"
@@ -901,15 +893,15 @@ msgstr "前のメニューに戻る"
#: src/emu/ui/menu.cpp:680
msgid "Auto"
-msgstr ""
+msgstr "自動"
#: src/emu/ui/menu.cpp:2073
msgid "Images"
-msgstr ""
+msgstr "画像"
#: src/emu/ui/menu.cpp:2074
msgid "Infos"
-msgstr ""
+msgstr "情報"
#: src/emu/ui/miscmenu.cpp:36
msgid "Keyboard Mode:"
@@ -1088,7 +1080,7 @@ msgstr "*** ui.iniの保存エラー ***"
#: src/emu/ui/optsmenu.cpp:347
#, c-format
msgid "**Error to load %s.ini**"
-msgstr "*** %s.iniの保存エラー ***"
+msgstr ""
#: src/emu/ui/optsmenu.cpp:372
#, c-format
@@ -1112,7 +1104,7 @@ msgstr "を押すかダブルクリックで選択してください"
#: src/emu/ui/selgame.cpp:38
msgid "General Info"
-msgstr ""
+msgstr "一般情報"
#: src/emu/ui/selgame.cpp:388 src/emu/ui/selsoft.cpp:280
#, c-format
@@ -1215,7 +1207,7 @@ msgstr ""
#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:769
msgid "Sound: Unimplemented"
-msgstr ""
+msgstr "サウンド:未実装"
#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:771
msgid "Sound: Imperfect"
@@ -1274,7 +1266,7 @@ msgstr "年度: %1$s\n"
#: src/emu/ui/selgame.cpp:1521
#, c-format
msgid "Manufacturer: %1$-.100s\n"
-msgstr ""
+msgstr "製造元: %1$-.100s\n"
#: src/emu/ui/selgame.cpp:1525
#, c-format
@@ -1311,7 +1303,7 @@ msgstr ""
#: src/emu/ui/selgame.cpp:1546
msgid "Sound: Unimplemented\n"
-msgstr ""
+msgstr "サウンド: 未実装\n"
#: src/emu/ui/selgame.cpp:1548
msgid "Sound: Imperfect\n"
@@ -1359,15 +1351,15 @@ msgstr ""
#: src/emu/ui/selgame.cpp:1559
#, c-format
msgid "Screen Orentation: %1$s\n"
-msgstr ""
+msgstr "画面の向き: %1$s\n"
#: src/emu/ui/selgame.cpp:1559
msgid "Vertical"
-msgstr ""
+msgstr "縦"
#: src/emu/ui/selgame.cpp:1559
msgid "Horizontal"
-msgstr ""
+msgstr "横"
#: src/emu/ui/selgame.cpp:1567
#, c-format
@@ -1473,7 +1465,7 @@ msgstr "選択中のソフトウェアパーツ:"
#: src/emu/ui/selsoft.cpp:2116 src/emu/ui/selsoft.cpp:2136
msgid "Bios selection:"
-msgstr "BIOS選択: "
+msgstr "BIOS選択:"
#: src/emu/ui/simpleselgame.cpp:232
#, c-format
@@ -1508,12 +1500,12 @@ msgstr ""
#: src/emu/ui/simpleselgame.cpp:345
msgid "Unimplemented"
-msgstr ""
+msgstr "未実装"
#: src/emu/ui/simpleselgame.cpp:351
#, c-format
msgid "Gfx: %s, Sound: %s"
-msgstr ""
+msgstr "グラフィックス:%s サウンド:%s"
#: src/emu/ui/slotopt.cpp:166
msgid " [internal]"
@@ -1550,7 +1542,7 @@ msgstr ""
#: src/emu/ui/swlist.cpp:268
msgid "description"
-msgstr ""
+msgstr "説明"
#: src/emu/ui/swlist.cpp:436
msgid "[compatible lists]"
@@ -1586,7 +1578,7 @@ msgstr "再生"
#: src/emu/ui/tapectrl.cpp:100
msgid "Record"
-msgstr ""
+msgstr "録音"
#: src/emu/ui/tapectrl.cpp:103
msgid "Rewind"
@@ -1870,7 +1862,7 @@ msgstr "マスター音量"
#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Volume"
-msgstr "%1$s音量"
+msgstr "%1$sの音量"
#: src/emu/ui/ui.cpp:1999
#, c-format
@@ -1880,7 +1872,7 @@ msgstr ""
#: src/emu/ui/ui.cpp:2019
#, c-format
msgid "%1$s Refresh Rate"
-msgstr ""
+msgstr "%1$sのリフレッシュレート"
#: src/emu/ui/ui.cpp:2025
#, c-format
diff --git a/language/Korean/strings.po b/language/Korean/strings.po
index ec094fb8c38..7b0783a718b 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/LICENSE b/language/LICENSE
new file mode 100644
index 00000000000..670154e3538
--- /dev/null
+++ b/language/LICENSE
@@ -0,0 +1,116 @@
+CC0 1.0 Universal
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific
+works ("Commons") that the public can reliably and without fear of later
+claims of infringement build upon, modify, incorporate in other works, reuse
+and redistribute as freely as possible in any form whatsoever and for any
+purposes, including without limitation commercial purposes. These owners may
+contribute to the Commons to promote the ideal of a free culture and the
+further production of creative, cultural and scientific works, or to gain
+reputation or greater distribution for their Work in part through the use and
+efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation
+of additional consideration or compensation, the person associating CC0 with a
+Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+and publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not limited
+to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
+ and translate a Work;
+
+ ii. moral rights retained by the original author(s) and/or performer(s);
+
+ iii. publicity and privacy rights pertaining to a person's image or likeness
+ depicted in a Work;
+
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+
+ v. rights protecting the extraction, dissemination, use and reuse of data in
+ a Work;
+
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation thereof,
+ including any amended or successor version of such directive); and
+
+ vii. other similar, equivalent or corresponding rights throughout the world
+ based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer's heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free,
+non transferable, non sublicensable, non exclusive, irrevocable and
+unconditional license to exercise Affirmer's Copyright and Related Rights in
+the Work (i) in all territories worldwide, (ii) for the maximum duration
+provided by applicable law or treaty (including future time extensions), (iii)
+in any current or future medium and for any number of copies, and (iv) for any
+purpose whatsoever, including without limitation commercial, advertising or
+promotional purposes (the "License"). The License shall be deemed effective as
+of the date CC0 was applied by Affirmer to the Work. Should any part of the
+License for any reason be judged legally invalid or ineffective under
+applicable law, such partial invalidity or ineffectiveness shall not
+invalidate the remainder of the License, and in such case Affirmer hereby
+affirms that he or she will not (i) exercise any of his or her remaining
+Copyright and Related Rights in the Work or (ii) assert any associated claims
+and causes of action with respect to the Work, in either case contrary to
+Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+
+ b. Affirmer offers the Work as-is and makes no representations or warranties
+ of any kind concerning the Work, express, implied, statutory or otherwise,
+ including without limitation warranties of title, merchantability, fitness
+ for a particular purpose, non infringement, or the absence of latent or
+ other defects, accuracy, or the present or absence of errors, whether or not
+ discoverable, all to the greatest extent permissible under applicable law.
+
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without limitation
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
+ disclaims responsibility for obtaining any necessary consents, permissions
+ or other rights required for any use of the Work.
+
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to this
+ CC0 or use of the Work.
+
+For more information, please see
+<http://creativecommons.org/publicdomain/zero/1.0/>
diff --git a/language/Latvian/strings.po b/language/Latvian/strings.po
index fc0748b6a20..f144ab6c83b 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Lithuanian/strings.po b/language/Lithuanian/strings.po
index 5b59054dd38..820b58a6615 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Macedonian/strings.po b/language/Macedonian/strings.po
index b020732264d..c56358f7d5d 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -551,11 +551,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -570,28 +567,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Norwegian/strings.po b/language/Norwegian/strings.po
index 17a6ccc47e0..25c7b49fd50 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Persian/strings.po b/language/Persian/strings.po
index fec73606e4a..fccf3dcd6b2 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -551,11 +551,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -570,28 +567,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Polish/strings.po b/language/Polish/strings.po
index e41b685cb85..3aeac5a80a0 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -554,11 +554,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -573,28 +570,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Portuguese/strings.po b/language/Portuguese/strings.po
index fbd1eec02ed..6812f1b6f73 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Portuguese_Brazil/strings.po b/language/Portuguese_Brazil/strings.po
index 11cff8229d7..0dacc777cc0 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-02 07:55+0100\n"
-"PO-Revision-Date: 2016-02-27 08:52+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
+"PO-Revision-Date: 2016-03-02 14:00+0100\n"
"Last-Translator: Ashura-X\n"
"Language-Team: MAME Language Team\n"
"Language: pt_BR\n"
@@ -142,12 +142,12 @@ msgstr "Outro filtro"
#: src/emu/ui/custmenu.cpp:174 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
-msgstr ""
+msgstr "^!Fabricante"
#: src/emu/ui/custmenu.cpp:183 src/emu/ui/custmenu.cpp:468
#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
-msgstr ""
+msgstr "^!Ano"
#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
msgid "Remove last filter"
@@ -164,11 +164,11 @@ msgstr "Selecionar filtros customizáveis:"
#: src/emu/ui/custmenu.cpp:459
msgid "^!Publisher"
-msgstr ""
+msgstr "^!Editor"
#: src/emu/ui/custmenu.cpp:477
msgid "^!Software List"
-msgstr ""
+msgstr "^!Lista de Software"
#: src/emu/ui/custmenu.cpp:486
msgid "^!Device type"
@@ -216,7 +216,7 @@ msgstr "Configurações Customizadas do UI"
#: src/emu/ui/custui.cpp:268
msgid "default"
-msgstr ""
+msgstr "padrão"
#: src/emu/ui/custui.cpp:371
msgid "UI Font"
@@ -349,22 +349,22 @@ msgstr "Mouse Over"
#: src/emu/ui/custui.cpp:860 src/emu/ui/custui.cpp:863
msgid "Alpha"
-msgstr ""
+msgstr "Opacidade"
#: src/emu/ui/custui.cpp:868 src/emu/ui/custui.cpp:871
#: src/emu/ui/custui.cpp:1030
msgid "Red"
-msgstr ""
+msgstr "Vermelho"
#: src/emu/ui/custui.cpp:876 src/emu/ui/custui.cpp:879
#: src/emu/ui/custui.cpp:1033
msgid "Green"
-msgstr ""
+msgstr "Verde"
#: src/emu/ui/custui.cpp:884 src/emu/ui/custui.cpp:887
#: src/emu/ui/custui.cpp:1034
msgid "Blue"
-msgstr ""
+msgstr "Azul"
#: src/emu/ui/custui.cpp:890
msgid "Choose from palette"
@@ -380,31 +380,31 @@ msgstr "Visualização da cor"
#: src/emu/ui/custui.cpp:1026
msgid "White"
-msgstr ""
+msgstr "Branco"
#: src/emu/ui/custui.cpp:1027
msgid "Silver"
-msgstr ""
+msgstr "Prata"
#: src/emu/ui/custui.cpp:1028
msgid "Gray"
-msgstr ""
+msgstr "Cinza"
#: src/emu/ui/custui.cpp:1029
msgid "Black"
-msgstr ""
+msgstr "Preto"
#: src/emu/ui/custui.cpp:1031
msgid "Orange"
-msgstr ""
+msgstr "Laranja"
#: src/emu/ui/custui.cpp:1032
msgid "Yellow"
-msgstr ""
+msgstr "Amarelo"
#: src/emu/ui/custui.cpp:1035
msgid "Violet"
-msgstr ""
+msgstr "Violeta"
#: src/emu/ui/datmenu.cpp:59
msgid "Software History"
@@ -554,12 +554,9 @@ msgid "Folders Setup"
msgstr "Configurar Pastas"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "Atual"
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr "Pastas"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -573,33 +570,28 @@ msgstr "Adicionar Pasta"
msgid "Remove Folder"
msgstr "Remover Pasta"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "Mudar)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "Adicionar"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " Busca - Pasta: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "Pressione TAB para definir"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "Remover "
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " Pasta"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
-msgstr ""
+msgstr "Modo do Vídeo"
#: src/emu/ui/dsplmenu.cpp:40
msgid "Hardware Stretch"
@@ -607,47 +599,47 @@ msgstr ""
#: src/emu/ui/dsplmenu.cpp:41
msgid "Triple Buffering"
-msgstr ""
+msgstr "Buffering Triplo"
#: src/emu/ui/dsplmenu.cpp:42
msgid "HLSL"
-msgstr ""
+msgstr "HLSL"
#: src/emu/ui/dsplmenu.cpp:44
msgid "GLSL"
-msgstr ""
+msgstr "GLSL"
#: src/emu/ui/dsplmenu.cpp:45
msgid "Bilinear Filtering"
-msgstr ""
+msgstr "Filtragem Bilinear"
#: src/emu/ui/dsplmenu.cpp:46
msgid "Bitmap Prescaling"
-msgstr ""
+msgstr "Pré-escala de Bitmap"
#: src/emu/ui/dsplmenu.cpp:47
msgid "Multi-Threaded Rendering"
-msgstr ""
+msgstr "Renderização em Múltiplas Threads"
#: src/emu/ui/dsplmenu.cpp:48
msgid "Window Mode"
-msgstr ""
+msgstr "Modo Janela"
#: src/emu/ui/dsplmenu.cpp:49
msgid "Enforce Aspect Ratio"
-msgstr ""
+msgstr "Forçar Razão de Aspecto"
#: src/emu/ui/dsplmenu.cpp:50
msgid "Start Out Maximized"
-msgstr ""
+msgstr "Iniciar Maximizado"
#: src/emu/ui/dsplmenu.cpp:51
msgid "Synchronized Refresh"
-msgstr ""
+msgstr "Atualização de Quadros Sincronizada"
#: src/emu/ui/dsplmenu.cpp:52
msgid "Wait Vertical Sync"
-msgstr ""
+msgstr "Aguardar Sincronismo Vertical"
#: src/emu/ui/dsplmenu.cpp:204 src/emu/ui/dsplmenu.cpp:224
#: src/emu/ui/optsmenu.cpp:265
@@ -656,7 +648,7 @@ msgstr "Opções de Tela"
#: src/emu/ui/filesel.cpp:159
msgid "File Already Exists - Override?"
-msgstr ""
+msgstr "Arquivo Já Existe - Sobrescrever?"
#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1552
#: src/emu/ui/selgame.cpp:1553 src/emu/ui/selgame.cpp:1554
@@ -867,47 +859,47 @@ msgstr ""
#: src/emu/ui/menu.cpp:50
msgid "Artwork Preview"
-msgstr ""
+msgstr "Pré-Visualização da Arte"
#: src/emu/ui/menu.cpp:54
msgid "Game Over"
-msgstr ""
+msgstr "Fim de Jogo"
#: src/emu/ui/menu.cpp:63
msgid "Add or remove favorites"
-msgstr ""
+msgstr "Adicionar ou remover favoritos"
#: src/emu/ui/menu.cpp:64
msgid "Export displayed list to file"
-msgstr ""
+msgstr "Exportar lista exibida para arquivo"
#: src/emu/ui/menu.cpp:65
msgid "Show DATs view"
-msgstr ""
+msgstr "Exibir visualização de DATs"
#: src/emu/ui/menu.cpp:252
msgid "Return to Machine"
-msgstr ""
+msgstr "Voltar à Máquina"
#: src/emu/ui/menu.cpp:256 src/emu/ui/menu.cpp:258
msgid "Exit"
-msgstr ""
+msgstr "Sair"
#: src/emu/ui/menu.cpp:263 src/emu/ui/menu.cpp:265
msgid "Return to Previous Menu"
-msgstr ""
+msgstr "Voltar ao Menu Anterior"
#: src/emu/ui/menu.cpp:680
msgid "Auto"
-msgstr ""
+msgstr "Automático"
#: src/emu/ui/menu.cpp:2073
msgid "Images"
-msgstr ""
+msgstr "Imagens"
#: src/emu/ui/menu.cpp:2074
msgid "Infos"
-msgstr ""
+msgstr "Informações"
#: src/emu/ui/miscmenu.cpp:36
msgid "Keyboard Mode:"
@@ -926,14 +918,14 @@ msgstr "Emulado"
msgid ""
"Uptime: %1$d:%2$02d:%3$02d\n"
"\n"
-msgstr ""
+msgstr "Tempo em execução: %1$d:%2$02d:%3$02d\n"
#: src/emu/ui/miscmenu.cpp:241
#, c-format
msgid ""
"Uptime: %1$d:%2$02d\n"
"\n"
-msgstr ""
+msgstr "Tempo em execução: %1$d:%2$02d\n"
#: src/emu/ui/miscmenu.cpp:245
#, c-format
@@ -944,12 +936,12 @@ msgstr ""
#: src/emu/ui/miscmenu.cpp:256
msgid "Coin %1$c: NA%3$s\n"
-msgstr ""
+msgstr "Ficha %1$c: NA%3$s\n"
#: src/emu/ui/miscmenu.cpp:256
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
-msgstr ""
+msgstr "Ficha %1$c: %2$d%3$s\n"
#: src/emu/ui/miscmenu.cpp:259
msgid " (locked)"
@@ -1007,24 +999,24 @@ msgstr "Opções Diversas"
#: src/emu/ui/miscmenu.cpp:733
#, c-format
msgid "%s.xml saved under ui folder."
-msgstr ""
+msgstr "%/.xml salvo no diretório ui."
#: src/emu/ui/miscmenu.cpp:761
msgid "Name: Description:\n"
-msgstr ""
+msgstr "Nome: Descrição:\n"
#: src/emu/ui/miscmenu.cpp:773
#, c-format
msgid "%s.txt saved under ui folder."
-msgstr ""
+msgstr "%s.txt salvo no diretório ui."
#: src/emu/ui/miscmenu.cpp:791
msgid "Export XML format (like -listxml)"
-msgstr ""
+msgstr "Exportar em formato XML (como -listxml)"
#: src/emu/ui/miscmenu.cpp:792
msgid "Export TXT format (like -listfull)"
-msgstr ""
+msgstr "Exportar em formato TXT (como -listfull)"
#: src/emu/ui/miscmenu.cpp:850
msgid "Dummy"
@@ -1032,7 +1024,7 @@ msgstr ""
#: src/emu/ui/miscmenu.cpp:852
msgid "Save machine configuration"
-msgstr ""
+msgstr "Salvar Configuração da Máquina"
#: src/emu/ui/optsmenu.cpp:217
msgid "Filter"
@@ -1040,19 +1032,19 @@ msgstr "Filtro"
#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
-msgstr ""
+msgstr " ^!Arquivo"
#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
-msgstr ""
+msgstr " ^!Categoria"
#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
-msgstr ""
+msgstr "^!Configurar filtro personalizado"
#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
-msgstr "Customizar UI"
+msgstr "Customizar Interface"
#: src/emu/ui/optsmenu.cpp:263
msgid "Configure Directories"
@@ -1077,17 +1069,17 @@ msgstr "Configurações"
#: src/emu/ui/optsmenu.cpp:325
msgid "**Error to save ui.ini**"
-msgstr "**Erro salvando ui.ini**"
+msgstr "**Erro ao salvar ui.ini**"
#: src/emu/ui/optsmenu.cpp:347
#, c-format
msgid "**Error to load %s.ini**"
-msgstr ""
+msgstr "**Erro ao carregar %s.ini**"
#: src/emu/ui/optsmenu.cpp:372
#, c-format
msgid "**Error to save %s.ini**"
-msgstr ""
+msgstr "**Erro ao salvar %s.ini**"
#: src/emu/ui/optsmenu.cpp:376
msgid ""
@@ -1106,14 +1098,14 @@ msgstr " para selecionar"
#: src/emu/ui/selgame.cpp:38
msgid "General Info"
-msgstr ""
+msgstr "Informações Gerais"
#: src/emu/ui/selgame.cpp:388 src/emu/ui/selsoft.cpp:280
#, c-format
msgid ""
"%s\n"
" added to favorites list."
-msgstr ""
+msgstr " adicionado à lista de favoritos."
#: src/emu/ui/selgame.cpp:394 src/emu/ui/selgame.cpp:403
#: src/emu/ui/selsoft.cpp:285
@@ -1121,7 +1113,7 @@ msgstr ""
msgid ""
"%s\n"
" removed from favorites list."
-msgstr ""
+msgstr " removido da lista de favoritos."
#: src/emu/ui/selgame.cpp:464
msgid ""
@@ -1130,6 +1122,10 @@ msgid ""
"\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."
#: src/emu/ui/selgame.cpp:601 src/emu/ui/simpleselgame.cpp:262
msgid "Configure Options"
@@ -1137,83 +1133,83 @@ msgstr "Opções de configuração"
#: src/emu/ui/selgame.cpp:602
msgid "Configure Machine"
-msgstr ""
+msgstr "Configurar Máquina"
#: src/emu/ui/selgame.cpp:758
#, 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 máquinas (%5$d BIOS) )"
#: src/emu/ui/selgame.cpp:768
#, c-format
msgid "%1$s (%2$s - %3$s) - "
-msgstr ""
+msgstr "%1$s (%2$s - %3$s) -"
#: src/emu/ui/selgame.cpp:775 src/emu/ui/selgame.cpp:781
#, c-format
msgid "%1$s (%2$s) - "
-msgstr ""
+msgstr "%1$s (%2$s) - "
#: src/emu/ui/selgame.cpp:790
#, c-format
msgid "%1$s Search: %2$s_"
-msgstr ""
+msgstr "%1$s Busca: %2$s_"
#: src/emu/ui/selgame.cpp:838
#, c-format
msgid "Romset: %1$-.100s"
-msgstr ""
+msgstr "Romset: %1$-.100s"
#: src/emu/ui/selgame.cpp:841 src/emu/ui/selgame.cpp:890
#: src/emu/ui/selsoft.cpp:744 src/emu/ui/selsoft.cpp:794
#: src/emu/ui/simpleselgame.cpp:325
#, c-format
msgid "%1$s, %2$-.100s"
-msgstr ""
+msgstr "%1$s, %2$-.100s"
#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:750
#, c-format
msgid "Driver is clone of: %1$-.100s"
-msgstr ""
+msgstr "Driver é clone de: %1$-.100s"
#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:752
msgid "Driver is parent"
-msgstr ""
+msgstr "Driver é o principal"
#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:756
#: src/emu/ui/simpleselgame.cpp:332
msgid "Overall: NOT WORKING"
-msgstr ""
+msgstr "Geral: NÃO FUNCIONA"
#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:758
#: src/emu/ui/simpleselgame.cpp:334
msgid "Overall: Unemulated Protection"
-msgstr ""
+msgstr "Geral: Proteção Não Emulada"
#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:760
#: src/emu/ui/simpleselgame.cpp:336
msgid "Overall: Working"
-msgstr ""
+msgstr "Geral: Funcionando"
#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:764
msgid "Graphics: Imperfect, "
-msgstr ""
+msgstr "Gráficos: Imperfeitos, "
#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:766
msgid "Graphics: OK, "
-msgstr ""
+msgstr "Gráficos: OK, "
#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:769
msgid "Sound: Unimplemented"
-msgstr ""
+msgstr "Som: Não Implementado"
#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:771
msgid "Sound: Imperfect"
-msgstr ""
+msgstr "Som: Imperfeito"
#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:773
msgid "Sound: OK"
-msgstr ""
+msgstr "Som: OK"
#: src/emu/ui/selgame.cpp:887
#, c-format
@@ -1227,129 +1223,129 @@ msgstr ""
#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:800
msgid "Software is parent"
-msgstr ""
+msgstr "Software é o principal"
#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:805
msgid "Supported: No"
-msgstr ""
+msgstr "Suportado: Não"
#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:810
msgid "Supported: Partial"
-msgstr ""
+msgstr "Suportado: Parcialmente"
#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:815
msgid "Supported: Yes"
-msgstr ""
+msgstr "Suportado: Sim"
#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:820
#, c-format
msgid "romset: %1$-.100s"
-msgstr ""
+msgstr "romset: %1$-.100s"
#: src/emu/ui/selgame.cpp:923
#, c-format
msgid "%1$s %2$s"
-msgstr ""
+msgstr "%1$s %2$s"
#: src/emu/ui/selgame.cpp:1519
#, c-format
msgid "Romset: %1$-.100s\n"
-msgstr ""
+msgstr "Romset: %1$-.100s\n"
#: src/emu/ui/selgame.cpp:1520
#, c-format
msgid "Year: %1$s\n"
-msgstr ""
+msgstr "Ano: %1$s\n"
#: src/emu/ui/selgame.cpp:1521
#, c-format
msgid "Manufacturer: %1$-.100s\n"
-msgstr ""
+msgstr "Fabricante: %1$-.100s\n"
#: src/emu/ui/selgame.cpp:1525
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
-msgstr ""
+msgstr "Driver é Clone de: %1$-.100s\n"
#: src/emu/ui/selgame.cpp:1527
msgid "Driver is Parent\n"
-msgstr ""
+msgstr "Driver é o Principal\n"
#: src/emu/ui/selgame.cpp:1530
msgid "Overall: NOT WORKING\n"
-msgstr ""
+msgstr "Geral: NÃO FUNCIONA\n"
#: src/emu/ui/selgame.cpp:1532
msgid "Overall: Unemulated Protection\n"
-msgstr ""
+msgstr "Geral: Proteção Não Emulada\n"
#: src/emu/ui/selgame.cpp:1534
msgid "Overall: Working\n"
-msgstr ""
+msgstr "Geral: Funcionando\n"
#: src/emu/ui/selgame.cpp:1537
msgid "Graphics: Imperfect Colors\n"
-msgstr ""
+msgstr "Gráficos: Cores Imperfeitas\n"
#: src/emu/ui/selgame.cpp:1541
msgid "Graphics: Imperfect\n"
-msgstr ""
+msgstr "Gráficos: Imperfeitos\n"
#: src/emu/ui/selgame.cpp:1543
msgid "Graphics: OK\n"
-msgstr ""
+msgstr "Gráficos: OK\n"
#: src/emu/ui/selgame.cpp:1546
msgid "Sound: Unimplemented\n"
-msgstr ""
+msgstr "Som: Não Implementado\n"
#: src/emu/ui/selgame.cpp:1548
msgid "Sound: Imperfect\n"
-msgstr ""
+msgstr "Som: Imperfeito\n"
#: src/emu/ui/selgame.cpp:1550
msgid "Sound: OK\n"
-msgstr ""
+msgstr "Som: OK\n"
#: src/emu/ui/selgame.cpp:1552
#, c-format
msgid "Driver is Skeleton: %1$s\n"
-msgstr ""
+msgstr "Driver é Preliminar: %1$s\n"
#: src/emu/ui/selgame.cpp:1553
#, c-format
msgid "Game is Mechanical: %1$s\n"
-msgstr ""
+msgstr "Jogo é Mecânico: %1$s\n"
#: src/emu/ui/selgame.cpp:1554
#, c-format
msgid "Requires Artwork: %1$s\n"
-msgstr ""
+msgstr "Requer Arte: %1$s\n"
#: src/emu/ui/selgame.cpp:1555
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
-msgstr ""
+msgstr "Requer Arte Clicável: %1$s\n"
#: src/emu/ui/selgame.cpp:1556
#, c-format
msgid "Support Cocktail: %1$s\n"
-msgstr ""
+msgstr "Suporta Cocktail: %1$s\n"
#: src/emu/ui/selgame.cpp:1557
#, c-format
msgid "Driver is Bios: %1$s\n"
-msgstr ""
+msgstr "Driver é Bios: %1$s\n"
#: src/emu/ui/selgame.cpp:1558
#, c-format
msgid "Support Save: %1$s\n"
-msgstr ""
+msgstr "Suporta Salvar: %1$s\n"
#: src/emu/ui/selgame.cpp:1559
#, c-format
msgid "Screen Orentation: %1$s\n"
-msgstr ""
+msgstr "Orientação da Tela: %1$s\n"
#: src/emu/ui/selgame.cpp:1559
msgid "Vertical"
@@ -1357,32 +1353,34 @@ msgstr ""
#: src/emu/ui/selgame.cpp:1559
msgid "Horizontal"
-msgstr ""
+msgstr "Horizontal"
#: src/emu/ui/selgame.cpp:1567
#, c-format
msgid "Requires CHD: %1$s\n"
-msgstr ""
+msgstr "Requer CHD: %1$s\n"
#: src/emu/ui/selgame.cpp:1580
msgid "Roms Audit Pass: OK\n"
msgstr ""
+"Checagem de Roms: OK\n"
+" "
#: src/emu/ui/selgame.cpp:1582
msgid "Roms Audit Pass: BAD\n"
-msgstr ""
+msgstr "Checagem de Roms: ERRO\n"
#: src/emu/ui/selgame.cpp:1585
msgid "Samples Audit Pass: None Needed\n"
-msgstr ""
+msgstr "Checagem de Amostras Sonoras: Não Necessárias\n"
#: src/emu/ui/selgame.cpp:1587
msgid "Samples Audit Pass: OK\n"
-msgstr ""
+msgstr "Checagem de Amostras Sonoras: OK\n"
#: src/emu/ui/selgame.cpp:1589
msgid "Samples Audit Pass: BAD\n"
-msgstr ""
+msgstr "Checagem de Amostras Sonoras: ERRO\n"
#: src/emu/ui/selgame.cpp:1592
msgid ""
@@ -1424,32 +1422,32 @@ msgstr ""
#: src/emu/ui/selsoft.cpp:687
#, c-format
msgid "Region: %1$s -"
-msgstr ""
+msgstr "Região: %1$s -"
#: src/emu/ui/selsoft.cpp:689
#, c-format
msgid "Publisher: %1$s -"
-msgstr ""
+msgstr "Editor: %1$s -"
#: src/emu/ui/selsoft.cpp:691
#, c-format
msgid "Year: %1$s -"
-msgstr ""
+msgstr "Ano: %1$s -"
#: src/emu/ui/selsoft.cpp:693
#, c-format
msgid "Software List: %1$s -"
-msgstr ""
+msgstr "Lista de Software: %1$s -"
#: src/emu/ui/selsoft.cpp:695
#, c-format
msgid "Device type: %1$s -"
-msgstr ""
+msgstr "Tipo de Dispositivo"
#: src/emu/ui/selsoft.cpp:697
#, c-format
msgid "%s Search: %s_"
-msgstr ""
+msgstr "%s Busca: %s_"
#: src/emu/ui/selsoft.cpp:741 src/emu/ui/selsoft.cpp:791
#: src/emu/ui/simpleselgame.cpp:322
@@ -1523,68 +1521,68 @@ msgstr "Usar Amostras Externas"
#: src/emu/ui/swlist.cpp:70
msgid "[file manager]"
-msgstr ""
+msgstr "[gerenciador de arquivos]"
#: src/emu/ui/swlist.cpp:235
msgid "Switch Item Ordering"
-msgstr ""
+msgstr "Alterar Ordem dos Itens"
#: src/emu/ui/swlist.cpp:268
#, c-format
msgid "Switched Order: entries now ordered by %s"
-msgstr ""
+msgstr "Ordem Alterada: Entradas agora ordenadas por %s"
#: src/emu/ui/swlist.cpp:268
msgid "shortname"
-msgstr ""
+msgstr "nome curto"
#: src/emu/ui/swlist.cpp:268
msgid "description"
-msgstr ""
+msgstr "descrição"
#: src/emu/ui/swlist.cpp:436
msgid "[compatible lists]"
-msgstr ""
+msgstr "[listas compatíveis]"
#: src/emu/ui/tapectrl.cpp:84
msgid "stopped"
-msgstr ""
+msgstr "parado"
#: src/emu/ui/tapectrl.cpp:86
msgid "playing"
-msgstr ""
+msgstr "jogando"
#: src/emu/ui/tapectrl.cpp:86
msgid "(playing)"
-msgstr ""
+msgstr "(jogando)"
#: src/emu/ui/tapectrl.cpp:87
msgid "recording"
-msgstr ""
+msgstr "gravando"
#: src/emu/ui/tapectrl.cpp:87
msgid "(recording)"
-msgstr ""
+msgstr "(gravando)"
#: src/emu/ui/tapectrl.cpp:94
msgid "Pause/Stop"
-msgstr ""
+msgstr "Pausar/Parar"
#: src/emu/ui/tapectrl.cpp:97
msgid "Play"
-msgstr ""
+msgstr "Tocar"
#: src/emu/ui/tapectrl.cpp:100
msgid "Record"
-msgstr ""
+msgstr "Gravar"
#: src/emu/ui/tapectrl.cpp:103
msgid "Rewind"
-msgstr ""
+msgstr "Rebobinar"
#: src/emu/ui/tapectrl.cpp:106
msgid "Fast Forward"
-msgstr ""
+msgstr "Avanço Rápido"
#: src/emu/ui/ui.cpp:415
msgid "This driver requires images to be loaded in the following device(s): "
@@ -1730,11 +1728,11 @@ msgstr ""
#: src/emu/ui/ui.cpp:1228 src/emu/ui/ui.cpp:1267
msgid "MHz"
-msgstr ""
+msgstr "MHz"
#: src/emu/ui/ui.cpp:1228 src/emu/ui/ui.cpp:1267
msgid "kHz"
-msgstr ""
+msgstr "kHz"
#: src/emu/ui/ui.cpp:1242
msgid ""
@@ -1754,7 +1752,7 @@ msgstr "Nada"
#: src/emu/ui/ui.cpp:1282
msgid "Vector"
-msgstr ""
+msgstr "Vetorial"
#: src/emu/ui/ui.cpp:1293
#, c-format
@@ -1827,6 +1825,10 @@ msgid ""
"Press ''%1$s'' to quit,\n"
"Press ''%2$s'' to return to emulation."
msgstr ""
+"Tem certeza que deseja sair?\n"
+"\n"
+"Pressione ''%1$s'' para sair,\n"
+"Pressione ''%2$s'' para retornar à emulação."
#: src/emu/ui/ui.cpp:1967
msgid "Master Volume"
@@ -1835,72 +1837,72 @@ msgstr "Volume Mestre"
#: src/emu/ui/ui.cpp:1977
#, c-format
msgid "%1$s Volume"
-msgstr ""
+msgstr "%1$s Volume"
#: src/emu/ui/ui.cpp:1999
#, c-format
msgid "Overclock CPU %1$s"
-msgstr ""
+msgstr "Overclock CPU %1$s"
#: src/emu/ui/ui.cpp:2019
#, c-format
msgid "%1$s Refresh Rate"
-msgstr ""
+msgstr "Taxa de Atualização da %1$s"
#: src/emu/ui/ui.cpp:2025
#, c-format
msgid "%1$s Brightness"
-msgstr ""
+msgstr "Brilho da %1$s"
#: src/emu/ui/ui.cpp:2028
#, c-format
msgid "%1$s Contrast"
-msgstr ""
+msgstr "Contraste da %1$s"
#: src/emu/ui/ui.cpp:2031
#, c-format
msgid "%1$s Gamma"
-msgstr ""
+msgstr "Gama da %1$s"
#: src/emu/ui/ui.cpp:2036
#, c-format
msgid "%1$s Horiz Stretch"
-msgstr ""
+msgstr "Extensão Horizontal da %1$s"
#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "%1$s Horiz Position"
-msgstr ""
+msgstr "Posição Horizontal %1$s"
#: src/emu/ui/ui.cpp:2042
#, c-format
msgid "%1$s Vert Stretch"
-msgstr ""
+msgstr "Extensão Vertical da %1$s"
#: src/emu/ui/ui.cpp:2045
#, c-format
msgid "%1$s Vert Position"
-msgstr ""
+msgstr "Posição Vertical da %1$s"
#: src/emu/ui/ui.cpp:2063
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
-msgstr ""
+msgstr "Laserdisc '%1$s' Extensão Horizontal"
#: src/emu/ui/ui.cpp:2066
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
-msgstr ""
+msgstr "Laserdisc '%1$s' Posição Horizontal"
#: src/emu/ui/ui.cpp:2069
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
-msgstr ""
+msgstr "Laserdisc '%1$s' Extensão Vertical"
#: src/emu/ui/ui.cpp:2072
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
-msgstr ""
+msgstr "Laserdisc '%1$s' Posição Vertical"
#: src/emu/ui/ui.cpp:2081
msgid "Vector Flicker"
@@ -1921,40 +1923,40 @@ msgstr "Intensidade do tamanho do Feixe de Luz"
#: src/emu/ui/ui.cpp:2099
#, c-format
msgid "Crosshair Scale %1$s"
-msgstr ""
+msgstr "Escala da Mira %1$s"
#: src/emu/ui/ui.cpp:2099 src/emu/ui/ui.cpp:2102
msgid "X"
-msgstr ""
+msgstr "X"
#: src/emu/ui/ui.cpp:2099 src/emu/ui/ui.cpp:2102
msgid "Y"
-msgstr ""
+msgstr "Y"
#: src/emu/ui/ui.cpp:2102
#, c-format
msgid "Crosshair Offset %1$s"
-msgstr ""
+msgstr "Ajuste da Mira"
#: src/emu/ui/ui.cpp:2121
#, c-format
msgid "%1$3ddB"
-msgstr ""
+msgstr "%1$3ddB"
#: src/emu/ui/ui.cpp:2165
#, c-format
msgid "%1$d%%"
-msgstr ""
+msgstr "%1$d%%"
#: src/emu/ui/ui.cpp:2181
#, c-format
msgid "%1$3.0f%%"
-msgstr ""
+msgstr "%1$3.0f%%"
#: src/emu/ui/ui.cpp:2204
#, c-format
msgid "%1$.3ffps"
-msgstr ""
+msgstr "%1$.3ffps"
#: src/emu/ui/ui.cpp:2227 src/emu/ui/ui.cpp:2249 src/emu/ui/ui.cpp:2270
#: src/emu/ui/ui.cpp:2292 src/emu/ui/ui.cpp:2314 src/emu/ui/ui.cpp:2336
@@ -1962,18 +1964,18 @@ msgstr ""
#: src/emu/ui/ui.cpp:2424 src/emu/ui/ui.cpp:2446
#, c-format
msgid "%1$.3f"
-msgstr ""
+msgstr "%1$.3f"
#: src/emu/ui/ui.cpp:2462 src/emu/ui/ui.cpp:2478 src/emu/ui/ui.cpp:2494
#: src/emu/ui/ui.cpp:2510
#, c-format
msgid "%1$1.2f"
-msgstr ""
+msgstr "%1$1.2f"
#: src/emu/ui/ui.cpp:2526
#, c-format
msgid "Screen '%1$s'"
-msgstr ""
+msgstr "Tela '%1$s'"
#: src/emu/ui/ui.cpp:2528
msgid "Screen"
@@ -1982,22 +1984,22 @@ msgstr "Tela"
#: src/emu/ui/ui.cpp:2544
#, c-format
msgid "Crosshair Scale X %1$1.3f"
-msgstr ""
+msgstr "Escala da Mira X %1$1.3f"
#: src/emu/ui/ui.cpp:2544
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
-msgstr ""
+msgstr "Escala da Mira Y %1$1.3f"
#: src/emu/ui/ui.cpp:2563
#, c-format
msgid "Crosshair Offset X %1$1.3f"
-msgstr ""
+msgstr "Ajuste da Mira X %1$1.3f"
#: src/emu/ui/ui.cpp:2563
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
-msgstr ""
+msgstr "Ajuste da Mira Y %1$1.3f"
#: src/emu/ui/videoopt.cpp:55
#, c-format
@@ -2044,6 +2046,27 @@ msgstr " CORES"
msgid " PENS"
msgstr " CANETAS"
+#~ msgid "Current "
+#~ msgstr "Atual"
+
+#~ msgid " Folders"
+#~ msgstr "Pastas"
+
+#~ msgid "Change)"
+#~ msgstr "Mudar)"
+
+#~ msgid "Add"
+#~ msgstr "Adicionar"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " Busca - Pasta: "
+
+#~ msgid "Remove "
+#~ msgstr "Remover "
+
+#~ msgid " Folder"
+#~ msgstr " Pasta"
+
#~ msgid "Search: "
#~ msgstr "Busca: "
diff --git a/language/README.md b/language/README.md
new file mode 100644
index 00000000000..01449b222a2
--- /dev/null
+++ b/language/README.md
@@ -0,0 +1,5 @@
+# **Translations** #
+
+Translation files contains work of many authors used to localize MAME to more languages.
+
+Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file
diff --git a/language/Romanian/strings.po b/language/Romanian/strings.po
index 580e4f26efa..ea7e520afcf 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -554,11 +554,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -573,28 +570,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Russian/strings.po b/language/Russian/strings.po
index 7dd70148d6c..8dd1a3ebf40 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -556,12 +556,9 @@ msgid "Folders Setup"
msgstr "Установки папок"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "Текущий "
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " Папки"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -575,29 +572,24 @@ msgstr "Добавить папку"
msgid "Remove Folder"
msgstr "Удалить папку"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "Изменить)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "Добавить"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " Папка - Поиск: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "Нажмите TAB для выбора"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "Убрать "
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " Папка"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
@@ -2050,6 +2042,27 @@ msgstr " ЦВЕТА"
msgid " PENS"
msgstr ""
+#~ msgid "Current "
+#~ msgstr "Текущий "
+
+#~ msgid " Folders"
+#~ msgstr " Папки"
+
+#~ msgid "Change)"
+#~ msgstr "Изменить)"
+
+#~ msgid "Add"
+#~ msgstr "Добавить"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " Папка - Поиск: "
+
+#~ msgid "Remove "
+#~ msgstr "Убрать "
+
+#~ msgid " Folder"
+#~ msgstr " Папка"
+
#~ msgid " Search: "
#~ msgstr " Поиск: "
diff --git a/language/Serbian/strings.po b/language/Serbian/strings.po
index aae95179728..30974eb7404 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-03 07:42+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-03-02 21:46+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -557,12 +557,9 @@ msgid "Folders Setup"
msgstr "Podešenje direktorijuma"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "Trenutno"
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " Direktorijumi"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -576,29 +573,24 @@ msgstr "Dodaj direktorijum"
msgid "Remove Folder"
msgstr "Ukloni direktorijum"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "Promeni)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "Dodaj"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " Direktorijum - pretraga"
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "Pritisnite TAB da podesite"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "Ukloni"
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " Direktorijum"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
@@ -2099,3 +2091,24 @@ msgstr " BOJE"
#: src/emu/ui/viewgfx.cpp:391
msgid " PENS"
msgstr ""
+
+#~ msgid "Current "
+#~ msgstr "Trenutno"
+
+#~ msgid " Folders"
+#~ msgstr " Direktorijumi"
+
+#~ msgid "Change)"
+#~ msgstr "Promeni)"
+
+#~ msgid "Add"
+#~ msgstr "Dodaj"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " Direktorijum - pretraga"
+
+#~ msgid "Remove "
+#~ msgstr "Ukloni"
+
+#~ msgid " Folder"
+#~ msgstr " Direktorijum"
diff --git a/language/Serbian_Cyrillic/strings.po b/language/Serbian_Cyrillic/strings.po
index d6d4d948ff1..f526b8e5a5a 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-23 12:43+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -557,12 +557,9 @@ msgid "Folders Setup"
msgstr "Подeшeњe дирeкториjума"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "Трeнутно"
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " Дирeкториjуми"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -576,29 +573,24 @@ msgstr "Додај директоријум"
msgid "Remove Folder"
msgstr "Уклони дирeкториjум"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "Промeни)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "Додаj"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " Дирeкториjум - прeтрага"
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "Притиснитe ТАБ да подeситe"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "Уклони"
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " Дирeкториjум"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
@@ -2096,4 +2088,25 @@ msgstr " БОЈЕ"
#: src/emu/ui/viewgfx.cpp:391
msgid " PENS"
-msgstr "" \ No newline at end of file
+msgstr ""
+
+#~ msgid "Current "
+#~ msgstr "Трeнутно"
+
+#~ msgid " Folders"
+#~ msgstr " Дирeкториjуми"
+
+#~ msgid "Change)"
+#~ msgstr "Промeни)"
+
+#~ msgid "Add"
+#~ msgstr "Додаj"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " Дирeкториjум - прeтрага"
+
+#~ msgid "Remove "
+#~ msgstr "Уклони"
+
+#~ msgid " Folder"
+#~ msgstr " Дирeкториjум"
diff --git a/language/Slovak/strings.po b/language/Slovak/strings.po
index 40453bf8a0b..b56062982a3 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Slovenian/strings.po b/language/Slovenian/strings.po
index 21894aa8faf..01e16cad973 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -554,11 +554,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -573,28 +570,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Spanish/strings.po b/language/Spanish/strings.po
index d2dad50b527..9bae6af0b11 100644
--- a/language/Spanish/strings.po
+++ b/language/Spanish/strings.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: A.Viloria\n"
"Language-Team: MAME Language Team\n"
@@ -144,12 +144,12 @@ msgstr "Otros filtros"
#: src/emu/ui/custmenu.cpp:174 src/emu/ui/optsmenu.cpp:239
msgid "^!Manufacturer"
-msgstr ""
+msgstr "^!Fabricante"
#: src/emu/ui/custmenu.cpp:183 src/emu/ui/custmenu.cpp:468
#: src/emu/ui/optsmenu.cpp:247
msgid "^!Year"
-msgstr ""
+msgstr "^!Año"
#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
msgid "Remove last filter"
@@ -166,19 +166,19 @@ msgstr "Seleccionar filtros personalizados:"
#: src/emu/ui/custmenu.cpp:459
msgid "^!Publisher"
-msgstr ""
+msgstr "^!Editor"
#: src/emu/ui/custmenu.cpp:477
msgid "^!Software List"
-msgstr ""
+msgstr "^!Lista de Software"
#: src/emu/ui/custmenu.cpp:486
msgid "^!Device type"
-msgstr ""
+msgstr "^!Tipo de Dispositivo"
#: src/emu/ui/custmenu.cpp:495
msgid "^!Region"
-msgstr ""
+msgstr "^!Región"
#: src/emu/ui/custui.cpp:20
msgid "Show All"
@@ -218,7 +218,7 @@ msgstr "Configuración personalizada del UI"
#: src/emu/ui/custui.cpp:268
msgid "default"
-msgstr ""
+msgstr "por defecto"
#: src/emu/ui/custui.cpp:371
msgid "UI Font"
@@ -351,22 +351,22 @@ msgstr "Mouse Sobre"
#: src/emu/ui/custui.cpp:860 src/emu/ui/custui.cpp:863
msgid "Alpha"
-msgstr ""
+msgstr "Alfa"
#: src/emu/ui/custui.cpp:868 src/emu/ui/custui.cpp:871
#: src/emu/ui/custui.cpp:1030
msgid "Red"
-msgstr ""
+msgstr "Rojo"
#: src/emu/ui/custui.cpp:876 src/emu/ui/custui.cpp:879
#: src/emu/ui/custui.cpp:1033
msgid "Green"
-msgstr ""
+msgstr "Verde"
#: src/emu/ui/custui.cpp:884 src/emu/ui/custui.cpp:887
#: src/emu/ui/custui.cpp:1034
msgid "Blue"
-msgstr ""
+msgstr "Azul"
#: src/emu/ui/custui.cpp:890
msgid "Choose from palette"
@@ -382,31 +382,31 @@ msgstr "Previsualización del color ="
#: src/emu/ui/custui.cpp:1026
msgid "White"
-msgstr ""
+msgstr "Blanco"
#: src/emu/ui/custui.cpp:1027
msgid "Silver"
-msgstr ""
+msgstr "Plateado"
#: src/emu/ui/custui.cpp:1028
msgid "Gray"
-msgstr ""
+msgstr "Gris"
#: src/emu/ui/custui.cpp:1029
msgid "Black"
-msgstr ""
+msgstr "Negro"
#: src/emu/ui/custui.cpp:1031
msgid "Orange"
-msgstr ""
+msgstr "Naranja"
#: src/emu/ui/custui.cpp:1032
msgid "Yellow"
-msgstr ""
+msgstr "Amarillo"
#: src/emu/ui/custui.cpp:1035
msgid "Violet"
-msgstr ""
+msgstr "Violeta"
#: src/emu/ui/datmenu.cpp:59
msgid "Software History"
@@ -556,12 +556,9 @@ msgid "Folders Setup"
msgstr "Configuración de las Carpetas"
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr "Actual "
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
-msgstr " Carpetas"
+#, c-format
+msgid "Current %1$s Folders"
+msgstr ""
#: src/emu/ui/dirmenu.cpp:195
msgid "Change Folder"
@@ -575,37 +572,32 @@ msgstr "Añadir Carpeta"
msgid "Remove Folder"
msgstr "Eliminar Carpeta"
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr "Cambio)"
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
-msgstr "Añadir"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
-msgstr " Carpeta - Buscar: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
+msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr "Pulsa TAB para fijar"
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr "Eliminar "
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
-msgstr " Carpeta"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
+msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
msgid "Video Mode"
-msgstr ""
+msgstr "Modo de Vídeo"
#: src/emu/ui/dsplmenu.cpp:40
msgid "Hardware Stretch"
-msgstr ""
+msgstr "Estiramiento por Hardware"
#: src/emu/ui/dsplmenu.cpp:41
msgid "Triple Buffering"
@@ -621,35 +613,35 @@ msgstr ""
#: src/emu/ui/dsplmenu.cpp:45
msgid "Bilinear Filtering"
-msgstr ""
+msgstr "Filtrado Bilineal"
#: src/emu/ui/dsplmenu.cpp:46
msgid "Bitmap Prescaling"
-msgstr ""
+msgstr "Preescalado de Bitmaps"
#: src/emu/ui/dsplmenu.cpp:47
msgid "Multi-Threaded Rendering"
-msgstr ""
+msgstr "Renderizado Multi-hilo"
#: src/emu/ui/dsplmenu.cpp:48
msgid "Window Mode"
-msgstr ""
+msgstr "Modo Ventana"
#: src/emu/ui/dsplmenu.cpp:49
msgid "Enforce Aspect Ratio"
-msgstr ""
+msgstr "Respetar Ratio de Aspecto"
#: src/emu/ui/dsplmenu.cpp:50
msgid "Start Out Maximized"
-msgstr ""
+msgstr "Iniciar en modo Maximizado"
#: src/emu/ui/dsplmenu.cpp:51
msgid "Synchronized Refresh"
-msgstr ""
+msgstr "Refresco Sincronizado"
#: src/emu/ui/dsplmenu.cpp:52
msgid "Wait Vertical Sync"
-msgstr ""
+msgstr "Esperar Sync Vertical"
#: src/emu/ui/dsplmenu.cpp:204 src/emu/ui/dsplmenu.cpp:224
#: src/emu/ui/optsmenu.cpp:265
@@ -658,7 +650,7 @@ msgstr "Mostrar Opciones"
#: src/emu/ui/filesel.cpp:159
msgid "File Already Exists - Override?"
-msgstr ""
+msgstr "El Fichero Ya Existe - ¿Sobreescribir?"
#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1552
#: src/emu/ui/selgame.cpp:1553 src/emu/ui/selgame.cpp:1554
@@ -678,77 +670,79 @@ msgstr "Si"
#: src/emu/ui/filesel.cpp:271
msgid "New Image Name:"
-msgstr ""
+msgstr "Nombre de la Nueva Imagen:"
#: src/emu/ui/filesel.cpp:277
msgid "Image Format:"
-msgstr ""
+msgstr "Formato de la Imagen:"
#: src/emu/ui/filesel.cpp:283
msgid "Create"
-msgstr ""
+msgstr "Crear"
#: src/emu/ui/filesel.cpp:314
msgid "Please enter a file extension too"
-msgstr ""
+msgstr "Por favor, introduzca también una extensión de fichero"
#: src/emu/ui/filesel.cpp:502 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
-msgstr ""
+msgstr "[slot vacío]"
#: src/emu/ui/filesel.cpp:506
msgid "[create]"
-msgstr ""
+msgstr "[crear]"
#: src/emu/ui/filesel.cpp:510 src/emu/ui/swlist.cpp:76
msgid "[software list]"
-msgstr ""
+msgstr "[lista de software]"
#: src/emu/ui/filesel.cpp:802
msgid "Select image format"
-msgstr ""
+msgstr "Seleccionar formato de imagen"
#: src/emu/ui/filesel.cpp:862
msgid "Select access mode"
-msgstr ""
+msgstr "Seleccionar modo de acceso"
#: src/emu/ui/filesel.cpp:863
msgid "Read-only"
-msgstr ""
+msgstr "Solo-Lectura"
#: src/emu/ui/filesel.cpp:865
msgid "Read-write"
-msgstr ""
+msgstr "Lectura-escritura"
#: src/emu/ui/filesel.cpp:866
msgid "Read this image, write to another image"
-msgstr ""
+msgstr "Leer de esta imagen, escribir en otro imagen"
#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to diff"
-msgstr ""
+msgstr "Leer de esta imagen, escribir a un fichero diff"
#: src/emu/ui/imgcntrl.cpp:115
msgid "Cannot save over directory"
-msgstr ""
+msgstr "No se puede guardar en el directorio"
#: src/emu/ui/imgcntrl.cpp:149
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
msgstr ""
+"El software seleccionado carece de una o más ROMs o imágenes CHD necesarias. "
+"Por favor, selecciones uno diferente."
#: src/emu/ui/info.cpp:98
msgid "Not supported"
-msgstr ""
+msgstr "No soportado"
#: src/emu/ui/info.cpp:101
msgid "Partially supported"
-msgstr ""
+msgstr "Parcialmente soportado"
#: src/emu/ui/info.cpp:109
msgid "[empty]"
-msgstr ""
+msgstr "[vacío]"
#: src/emu/ui/info_pty.cpp:26 src/emu/ui/mainmenu.cpp:90
msgid "Pseudo terminals"
@@ -756,15 +750,15 @@ msgstr "Pseudo terminales"
#: src/emu/ui/info_pty.cpp:35
msgid "[failed]"
-msgstr ""
+msgstr "[fallado]"
#: src/emu/ui/inputmap.cpp:52
msgid "User Interface"
-msgstr ""
+msgstr "Interfaz de usuario"
#: src/emu/ui/inputmap.cpp:59
msgid "Other Controls"
-msgstr ""
+msgstr "Otros Controles"
#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
#: src/emu/ui/slotopt.cpp:172
@@ -877,27 +871,27 @@ msgstr ""
#: src/emu/ui/menu.cpp:63
msgid "Add or remove favorites"
-msgstr ""
+msgstr "Añadir o eliminar favoritos"
#: src/emu/ui/menu.cpp:64
msgid "Export displayed list to file"
-msgstr ""
+msgstr "Exportar la lista mostrada a un fichero"
#: src/emu/ui/menu.cpp:65
msgid "Show DATs view"
-msgstr ""
+msgstr "Mostrar vista de los DATs"
#: src/emu/ui/menu.cpp:252
msgid "Return to Machine"
-msgstr ""
+msgstr "Volver a la Máquina"
#: src/emu/ui/menu.cpp:256 src/emu/ui/menu.cpp:258
msgid "Exit"
-msgstr ""
+msgstr "Salir"
#: src/emu/ui/menu.cpp:263 src/emu/ui/menu.cpp:265
msgid "Return to Previous Menu"
-msgstr ""
+msgstr "Volver al Menú Anterior"
#: src/emu/ui/menu.cpp:680
msgid "Auto"
@@ -942,16 +936,16 @@ msgstr ""
msgid ""
"Tickets dispensed: %1$d\n"
"\n"
-msgstr ""
+msgstr "Tickets dispensados: %1$d\n"
#: src/emu/ui/miscmenu.cpp:256
msgid "Coin %1$c: NA%3$s\n"
-msgstr ""
+msgstr "Moneda %1$c: NA%3$s\n"
#: src/emu/ui/miscmenu.cpp:256
#, c-format
msgid "Coin %1$c: %2$d%3$s\n"
-msgstr ""
+msgstr "Moneda %1$c: %2$d%3$s\n"
#: src/emu/ui/miscmenu.cpp:259
msgid " (locked)"
@@ -1022,11 +1016,11 @@ msgstr "%s.txt guardado en la carpeta ui"
#: src/emu/ui/miscmenu.cpp:791
msgid "Export XML format (like -listxml)"
-msgstr ""
+msgstr "Exportar formato XML (como -listxml)"
#: src/emu/ui/miscmenu.cpp:792
msgid "Export TXT format (like -listfull)"
-msgstr ""
+msgstr "Exportar formato TXT (como -listfull)"
#: src/emu/ui/miscmenu.cpp:850
msgid "Dummy"
@@ -1034,7 +1028,7 @@ msgstr ""
#: src/emu/ui/miscmenu.cpp:852
msgid "Save machine configuration"
-msgstr ""
+msgstr "Guardar configuración de la máquina"
#: src/emu/ui/optsmenu.cpp:217
msgid "Filter"
@@ -1042,15 +1036,15 @@ msgstr "Filtro"
#: src/emu/ui/optsmenu.cpp:226
msgid " ^!File"
-msgstr ""
+msgstr " ^!Fichero"
#: src/emu/ui/optsmenu.cpp:231
msgid " ^!Category"
-msgstr ""
+msgstr " ^!Categoría"
#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
-msgstr ""
+msgstr "^!Configurar filtro personalizado"
#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
@@ -1067,7 +1061,7 @@ msgstr "Opciones de Sonido"
#: src/emu/ui/optsmenu.cpp:269
msgid "General Inputs"
-msgstr ""
+msgstr "Inputs Generales"
#: src/emu/ui/optsmenu.cpp:271
msgid "Save Configuration"
@@ -1089,7 +1083,7 @@ msgstr "**Error al leer %s.ini**"
#: src/emu/ui/optsmenu.cpp:372
#, c-format
msgid "**Error to save %s.ini**"
-msgstr "Error al guardar %s.ini**"
+msgstr "**Error al guardar %s.ini**"
#: src/emu/ui/optsmenu.cpp:376
msgid ""
@@ -1139,8 +1133,8 @@ msgid ""
"\n"
"Press any key (except ESC) to continue."
msgstr ""
-"Falta la máquina seleccionada o una o más de sus ROM o imágenes CHD. Por "
-"favor elija otra máquina.\n"
+"La máquina seleccionada carece de una o más ROMs o imágenes CHD necesarias. "
+"Por favor elija otra máquina.\n"
"\n"
"Pulse cualquier tecla (excepto ESC) para continuar."
@@ -1150,12 +1144,12 @@ msgstr "Configurar Opciones"
#: src/emu/ui/selgame.cpp:602
msgid "Configure Machine"
-msgstr ""
+msgstr "Configurar Máquina"
#: src/emu/ui/selgame.cpp:758
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
-msgstr ""
+msgstr "%1$s %2$s ( máquinas %3$d / %4$d (BIOS %5$d) )"
#: src/emu/ui/selgame.cpp:768
#, c-format
@@ -1170,7 +1164,7 @@ msgstr ""
#: src/emu/ui/selgame.cpp:790
#, c-format
msgid "%1$s Search: %2$s_"
-msgstr ""
+msgstr "%1$s Buscar: %2$s_"
#: src/emu/ui/selgame.cpp:838
#, c-format
@@ -1187,72 +1181,72 @@ msgstr ""
#: src/emu/ui/selgame.cpp:847 src/emu/ui/selsoft.cpp:750
#, c-format
msgid "Driver is clone of: %1$-.100s"
-msgstr ""
+msgstr "El Driver es un clon de: %1$-.100s"
#: src/emu/ui/selgame.cpp:849 src/emu/ui/selsoft.cpp:752
msgid "Driver is parent"
-msgstr ""
+msgstr "El Driver es padre"
#: src/emu/ui/selgame.cpp:853 src/emu/ui/selsoft.cpp:756
#: src/emu/ui/simpleselgame.cpp:332
msgid "Overall: NOT WORKING"
-msgstr ""
+msgstr "General: NO FUNCIONA"
#: src/emu/ui/selgame.cpp:855 src/emu/ui/selsoft.cpp:758
#: src/emu/ui/simpleselgame.cpp:334
msgid "Overall: Unemulated Protection"
-msgstr ""
+msgstr "General: Protección no Emulada"
#: src/emu/ui/selgame.cpp:857 src/emu/ui/selsoft.cpp:760
#: src/emu/ui/simpleselgame.cpp:336
msgid "Overall: Working"
-msgstr ""
+msgstr "General: Funciona"
#: src/emu/ui/selgame.cpp:861 src/emu/ui/selsoft.cpp:764
msgid "Graphics: Imperfect, "
-msgstr ""
+msgstr "Gráficos: Imperfecto, "
#: src/emu/ui/selgame.cpp:863 src/emu/ui/selsoft.cpp:766
msgid "Graphics: OK, "
-msgstr ""
+msgstr "Gráficos: OK, "
#: src/emu/ui/selgame.cpp:866 src/emu/ui/selsoft.cpp:769
msgid "Sound: Unimplemented"
-msgstr ""
+msgstr "Sonido: No implementado"
#: src/emu/ui/selgame.cpp:868 src/emu/ui/selsoft.cpp:771
msgid "Sound: Imperfect"
-msgstr ""
+msgstr "Sonido: Imperfecto"
#: src/emu/ui/selgame.cpp:870 src/emu/ui/selsoft.cpp:773
msgid "Sound: OK"
-msgstr ""
+msgstr "Sonido: OK"
#: src/emu/ui/selgame.cpp:887
#, c-format
msgid "System: %1$-.100s"
-msgstr ""
+msgstr "Sistema: %1$-.100s"
#: src/emu/ui/selgame.cpp:894 src/emu/ui/selsoft.cpp:798
#, c-format
msgid "Software is clone of: %1$-.100s"
-msgstr ""
+msgstr "El Software es clon de: %1$-.100s"
#: src/emu/ui/selgame.cpp:896 src/emu/ui/selsoft.cpp:800
msgid "Software is parent"
-msgstr ""
+msgstr "El Software es padre"
#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:805
msgid "Supported: No"
-msgstr ""
+msgstr "Soportado: No"
#: src/emu/ui/selgame.cpp:906 src/emu/ui/selsoft.cpp:810
msgid "Supported: Partial"
-msgstr ""
+msgstr "Soportado: Parcial"
#: src/emu/ui/selgame.cpp:911 src/emu/ui/selsoft.cpp:815
msgid "Supported: Yes"
-msgstr ""
+msgstr "Soportado: Si"
#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:820
#, c-format
@@ -1272,17 +1266,17 @@ msgstr ""
#: src/emu/ui/selgame.cpp:1520
#, c-format
msgid "Year: %1$s\n"
-msgstr ""
+msgstr "Año: %1$s\n"
#: src/emu/ui/selgame.cpp:1521
#, c-format
msgid "Manufacturer: %1$-.100s\n"
-msgstr ""
+msgstr "Fabricante: %1$-.100s\n"
#: src/emu/ui/selgame.cpp:1525
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
-msgstr ""
+msgstr "El Driver es un clon de: %1$-.100s\n"
#: src/emu/ui/selgame.cpp:1527
msgid "Driver is Parent\n"
@@ -1327,42 +1321,42 @@ msgstr "Sonido: OK\n"
#: src/emu/ui/selgame.cpp:1552
#, c-format
msgid "Driver is Skeleton: %1$s\n"
-msgstr ""
+msgstr "El Driver es un Skeleton: %1$s\n"
#: src/emu/ui/selgame.cpp:1553
#, c-format
msgid "Game is Mechanical: %1$s\n"
-msgstr ""
+msgstr "El Juego es Mecánico: %1$s\n"
#: src/emu/ui/selgame.cpp:1554
#, c-format
msgid "Requires Artwork: %1$s\n"
-msgstr ""
+msgstr "Requiere Artwork: %1$s\n"
#: src/emu/ui/selgame.cpp:1555
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
-msgstr ""
+msgstr "Requiere Artwork Clicable: %1$s\n"
#: src/emu/ui/selgame.cpp:1556
#, c-format
msgid "Support Cocktail: %1$s\n"
-msgstr ""
+msgstr "Soporta Modo Cocktail: %1$s\n"
#: src/emu/ui/selgame.cpp:1557
#, c-format
msgid "Driver is Bios: %1$s\n"
-msgstr ""
+msgstr "El Driver es una Bios: %1$s\n"
#: src/emu/ui/selgame.cpp:1558
#, c-format
msgid "Support Save: %1$s\n"
-msgstr ""
+msgstr "Soporta Guardado: %1$s\n"
#: src/emu/ui/selgame.cpp:1559
#, c-format
msgid "Screen Orentation: %1$s\n"
-msgstr ""
+msgstr "Orientación de Pantalla: %1$s\n"
#: src/emu/ui/selgame.cpp:1559
msgid "Vertical"
@@ -1375,7 +1369,7 @@ msgstr "Horizontal"
#: src/emu/ui/selgame.cpp:1567
#, c-format
msgid "Requires CHD: %1$s\n"
-msgstr ""
+msgstr "Requiere CHD: %1$s\n"
#: src/emu/ui/selgame.cpp:1580
msgid "Roms Audit Pass: OK\n"
@@ -1429,37 +1423,37 @@ msgstr ""
#: src/emu/ui/selsoft.cpp:683
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
-msgstr ""
+msgstr "%1$s %2$s ( software %3$d / %4$d )"
#: src/emu/ui/selsoft.cpp:684
#, c-format
msgid "Driver: \"%1$s\" software list "
-msgstr ""
+msgstr "Driver: \"%1$s\" lista de software "
#: src/emu/ui/selsoft.cpp:687
#, c-format
msgid "Region: %1$s -"
-msgstr ""
+msgstr "Región: %1$s -"
#: src/emu/ui/selsoft.cpp:689
#, c-format
msgid "Publisher: %1$s -"
-msgstr ""
+msgstr "Editor: %1$s -"
#: src/emu/ui/selsoft.cpp:691
#, c-format
msgid "Year: %1$s -"
-msgstr ""
+msgstr "Año: %1$s -"
#: src/emu/ui/selsoft.cpp:693
#, c-format
msgid "Software List: %1$s -"
-msgstr ""
+msgstr "Lista de Software: %1$s -"
#: src/emu/ui/selsoft.cpp:695
#, c-format
msgid "Device type: %1$s -"
-msgstr ""
+msgstr "Tipo de Dispositivo: %1$s -"
#: src/emu/ui/selsoft.cpp:697
#, c-format
@@ -1492,11 +1486,11 @@ msgstr ""
#: src/emu/ui/simpleselgame.cpp:287
#, c-format
msgid "Type name or select: %1$s_"
-msgstr ""
+msgstr "Escriba el nombre o seleccione: %1$s_"
#: src/emu/ui/simpleselgame.cpp:289
msgid "Type name or select: (random)"
-msgstr ""
+msgstr "Escriba el nombre o seleccione: (aleatorio)"
#: src/emu/ui/simpleselgame.cpp:328
#, c-format
@@ -1505,7 +1499,7 @@ msgstr ""
#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
msgid "Imperfect"
-msgstr ""
+msgstr "Imperfecto"
#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
msgid "OK"
@@ -1513,7 +1507,7 @@ msgstr ""
#: src/emu/ui/simpleselgame.cpp:345
msgid "Unimplemented"
-msgstr ""
+msgstr "No implementado"
#: src/emu/ui/simpleselgame.cpp:351
#, c-format
@@ -1538,68 +1532,68 @@ msgstr "Utilizar Samples Externos"
#: src/emu/ui/swlist.cpp:70
msgid "[file manager]"
-msgstr ""
+msgstr "[gestor de ficheros]"
#: src/emu/ui/swlist.cpp:235
msgid "Switch Item Ordering"
-msgstr ""
+msgstr "Cambiar la Ordenación de los Elementos"
#: src/emu/ui/swlist.cpp:268
#, c-format
msgid "Switched Order: entries now ordered by %s"
-msgstr ""
+msgstr "Orden Cambiado: Las entradas ahora están ordenadas por %s"
#: src/emu/ui/swlist.cpp:268
msgid "shortname"
-msgstr ""
+msgstr "nombre corto"
#: src/emu/ui/swlist.cpp:268
msgid "description"
-msgstr ""
+msgstr "descripción"
#: src/emu/ui/swlist.cpp:436
msgid "[compatible lists]"
-msgstr ""
+msgstr "[listas compatibles]"
#: src/emu/ui/tapectrl.cpp:84
msgid "stopped"
-msgstr ""
+msgstr "parado"
#: src/emu/ui/tapectrl.cpp:86
msgid "playing"
-msgstr ""
+msgstr "reproduciendo"
#: src/emu/ui/tapectrl.cpp:86
msgid "(playing)"
-msgstr ""
+msgstr "(reproduciendo)"
#: src/emu/ui/tapectrl.cpp:87
msgid "recording"
-msgstr ""
+msgstr "grabando"
#: src/emu/ui/tapectrl.cpp:87
msgid "(recording)"
-msgstr ""
+msgstr "(grabando)"
#: src/emu/ui/tapectrl.cpp:94
msgid "Pause/Stop"
-msgstr ""
+msgstr "Pausar/Parar"
#: src/emu/ui/tapectrl.cpp:97
msgid "Play"
-msgstr ""
+msgstr "Reproducir"
#: src/emu/ui/tapectrl.cpp:100
msgid "Record"
-msgstr ""
+msgstr "Grabar"
#: src/emu/ui/tapectrl.cpp:103
msgid "Rewind"
-msgstr ""
+msgstr "Rebobinar"
#: src/emu/ui/tapectrl.cpp:106
msgid "Fast Forward"
-msgstr ""
+msgstr "Avance Rápido"
#: src/emu/ui/ui.cpp:415
msgid "This driver requires images to be loaded in the following device(s): "
@@ -1618,6 +1612,14 @@ msgid ""
"\n"
"Otherwise, type OK or move the joystick left then right to continue"
msgstr ""
+"El uso de emuladores junto con ROMs que no sean de su propiedad está "
+"prohibido por las leyes del copyright.\n"
+"\n"
+"SI NO ESTÁ LEGALMENTE LEGITIMADO PARA REPRODUCIR \"%1$s\" EN ESTE EMULADOR, "
+"PULSE ESC.\n"
+"\n"
+"En otro caso, teclee OK o mueva el joystick de izquierda a derecha para "
+"continuar"
#: src/emu/ui/ui.cpp:1081
msgid ""
@@ -1855,6 +1857,10 @@ msgid ""
"Press ''%1$s'' to quit,\n"
"Press ''%2$s'' to return to emulation."
msgstr ""
+"¿Está seguro de que quiere salir?\n"
+"\n"
+"Pulse ''%1$s'' para salir,\n"
+"Pulse ''%2$s'' para volver a la emulación."
#: src/emu/ui/ui.cpp:1967
msgid "Master Volume"
@@ -1949,7 +1955,7 @@ msgstr "Intensidad del Rayo"
#: src/emu/ui/ui.cpp:2099
#, c-format
msgid "Crosshair Scale %1$s"
-msgstr ""
+msgstr "Escala del Crosshair %1$s"
#: src/emu/ui/ui.cpp:2099 src/emu/ui/ui.cpp:2102
msgid "X"
@@ -1962,7 +1968,7 @@ msgstr ""
#: src/emu/ui/ui.cpp:2102
#, c-format
msgid "Crosshair Offset %1$s"
-msgstr ""
+msgstr "Offset del Crosshair %1$s"
#: src/emu/ui/ui.cpp:2121
#, c-format
@@ -2001,7 +2007,7 @@ msgstr ""
#: src/emu/ui/ui.cpp:2526
#, c-format
msgid "Screen '%1$s'"
-msgstr ""
+msgstr "Pantalla '%1$s'"
#: src/emu/ui/ui.cpp:2528
msgid "Screen"
@@ -2010,22 +2016,22 @@ msgstr "Pantalla"
#: src/emu/ui/ui.cpp:2544
#, c-format
msgid "Crosshair Scale X %1$1.3f"
-msgstr ""
+msgstr "Escala X del Crosshair %1$1.3f"
#: src/emu/ui/ui.cpp:2544
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
-msgstr ""
+msgstr "Escala Y del Crosshair %1$1.3f"
#: src/emu/ui/ui.cpp:2563
#, c-format
msgid "Crosshair Offset X %1$1.3f"
-msgstr ""
+msgstr "Offset X del Crosshair %1$1.3f"
#: src/emu/ui/ui.cpp:2563
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
-msgstr ""
+msgstr "Offset Y del Crosshair %1$1.3f"
#: src/emu/ui/videoopt.cpp:55
#, c-format
@@ -2072,6 +2078,27 @@ msgstr ""
msgid " PENS"
msgstr ""
+#~ msgid "Current "
+#~ msgstr "Actual "
+
+#~ msgid " Folders"
+#~ msgstr " Carpetas"
+
+#~ msgid "Change)"
+#~ msgstr "Cambio)"
+
+#~ msgid "Add"
+#~ msgstr "Añadir"
+
+#~ msgid " Folder - Search: "
+#~ msgstr " Carpeta - Buscar: "
+
+#~ msgid "Remove "
+#~ msgstr "Eliminar "
+
+#~ msgid " Folder"
+#~ msgstr " Carpeta"
+
#~ msgid " Search: "
#~ msgstr " Buscar: "
diff --git a/language/Spanish_Mexico/strings.po b/language/Spanish_Mexico/strings.po
index 8797184ee6f..4a2f0bbbea0 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Swedish/strings.po b/language/Swedish/strings.po
index fa980ed5cac..399271de75f 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Thai/strings.po b/language/Thai/strings.po
index a6f34d59360..4366ac7e3ec 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -551,11 +551,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -570,28 +567,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Turkish/strings.po b/language/Turkish/strings.po
index 887665c6158..9868bc9caee 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Ukrainian/strings.po b/language/Ukrainian/strings.po
index 82c13f3f02b..05f747d8233 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -553,11 +553,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -572,28 +569,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/language/Vietnamese/strings.po b/language/Vietnamese/strings.po
index a42b7a27587..068d7e483bb 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-02 07:55+0100\n"
+"POT-Creation-Date: 2016-03-05 22:55+1100\n"
"PO-Revision-Date: 2016-02-20 18:03+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: MAME Language Team\n"
@@ -552,11 +552,8 @@ msgid "Folders Setup"
msgstr ""
#: src/emu/ui/dirmenu.cpp:183
-msgid "Current "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:183
-msgid " Folders"
+#, c-format
+msgid "Current %1$s Folders"
msgstr ""
#: src/emu/ui/dirmenu.cpp:195
@@ -571,28 +568,23 @@ msgstr ""
msgid "Remove Folder"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Change)"
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:497
-msgid "Add"
+#: src/emu/ui/dirmenu.cpp:499
+#, c-format
+msgid "Change %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:498
-msgid " Folder - Search: "
+#: src/emu/ui/dirmenu.cpp:500
+#, c-format
+msgid "Add %1$s Folder - Search: %2$s_"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:533
+#: src/emu/ui/dirmenu.cpp:537
msgid "Press TAB to set"
msgstr ""
-#: src/emu/ui/dirmenu.cpp:639
-msgid "Remove "
-msgstr ""
-
-#: src/emu/ui/dirmenu.cpp:639
-msgid " Folder"
+#: src/emu/ui/dirmenu.cpp:643
+#, c-format
+msgid "Remove %1$s Folder"
msgstr ""
#: src/emu/ui/dsplmenu.cpp:38
diff --git a/nl_examples/7400_astable.c b/nl_examples/7400_astable.c
index 87e925b4a97..07748a0816a 100644
--- a/nl_examples/7400_astable.c
+++ b/nl_examples/7400_astable.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* 7400_astable.c
*
diff --git a/nl_examples/74123_mstable.c b/nl_examples/74123_mstable.c
index ddb8955e033..fd2bfd85871 100644
--- a/nl_examples/74123_mstable.c
+++ b/nl_examples/74123_mstable.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* 74123_mstable.c
*
diff --git a/nl_examples/9602_mstable.c b/nl_examples/9602_mstable.c
index 5db2df04d0e..8e482c8dfb3 100644
--- a/nl_examples/9602_mstable.c
+++ b/nl_examples/9602_mstable.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* 9602_mstable.c
*
diff --git a/nl_examples/bjt.c b/nl_examples/bjt.c
index fc5b72f3d02..7222ced4445 100644
--- a/nl_examples/bjt.c
+++ b/nl_examples/bjt.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* bjt.c
*
diff --git a/nl_examples/bjt_eb.c b/nl_examples/bjt_eb.c
index bc35345a44d..f21735c36ec 100644
--- a/nl_examples/bjt_eb.c
+++ b/nl_examples/bjt_eb.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* bjt.c
*
diff --git a/nl_examples/bjt_eb_pnp.c b/nl_examples/bjt_eb_pnp.c
index a4a0b8f566f..10169b6bd3f 100644
--- a/nl_examples/bjt_eb_pnp.c
+++ b/nl_examples/bjt_eb_pnp.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* bjt.c
*
diff --git a/nl_examples/breakout.c b/nl_examples/breakout.c
index 2c8d9f3ccae..591ffaf3414 100644
--- a/nl_examples/breakout.c
+++ b/nl_examples/breakout.c
@@ -1,4 +1,5 @@
-
+// license:GPL-2.0+
+// copyright-holders:Couriersud
#define NETLIST_DEVELOPMENT 1
#include "netlist/nl_dice_compat.h"
diff --git a/nl_examples/cd4066.c b/nl_examples/cd4066.c
index 1db59b670ed..c77e6438c0f 100644
--- a/nl_examples/cd4066.c
+++ b/nl_examples/cd4066.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* bjt.c
*
diff --git a/nl_examples/cdelay.c b/nl_examples/cdelay.c
index 9a6bdcc1aff..6f396e8ca07 100644
--- a/nl_examples/cdelay.c
+++ b/nl_examples/cdelay.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* cdelay.c
*
diff --git a/nl_examples/congo_bongo.c b/nl_examples/congo_bongo.c
index facd4054c00..4256d364d17 100644
--- a/nl_examples/congo_bongo.c
+++ b/nl_examples/congo_bongo.c
@@ -1,4 +1,5 @@
-
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/* € */ // ABC
#include "netlist/devices/net_lib.h"
diff --git a/nl_examples/kidniki.c b/nl_examples/kidniki.c
index 9e2b0052dae..661f94ca72d 100644
--- a/nl_examples/kidniki.c
+++ b/nl_examples/kidniki.c
@@ -1,4 +1,5 @@
-
+// license:GPL-2.0+
+// copyright-holders:Couriersud
#include "netlist/devices/net_lib.h"
#include "netlist/devices/nld_system.h"
#include "netlist/analog/nld_bjt.h"
diff --git a/nl_examples/mm5837_noise.c b/nl_examples/mm5837_noise.c
index 7afe2b6e54d..dff1966e1eb 100644
--- a/nl_examples/mm5837_noise.c
+++ b/nl_examples/mm5837_noise.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* mm5837_noise.c
*
diff --git a/nl_examples/msx_mixer_stage.c b/nl_examples/msx_mixer_stage.c
index ddc1cd70cfd..445777eb9cf 100644
--- a/nl_examples/msx_mixer_stage.c
+++ b/nl_examples/msx_mixer_stage.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* bjt.c
*
diff --git a/nl_examples/ne555_astable.c b/nl_examples/ne555_astable.c
index 0ab323d3c2d..d5a77b9b8fa 100644
--- a/nl_examples/ne555_astable.c
+++ b/nl_examples/ne555_astable.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* ne555_astable.c
*
diff --git a/nl_examples/opamp.c b/nl_examples/opamp.c
index ce347c21c64..40c04a5d4f2 100644
--- a/nl_examples/opamp.c
+++ b/nl_examples/opamp.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* opamp.c
*
diff --git a/nl_examples/sn74ls629_osc.c b/nl_examples/sn74ls629_osc.c
index 8e697e0855f..f40c464f55c 100644
--- a/nl_examples/sn74ls629_osc.c
+++ b/nl_examples/sn74ls629_osc.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* ne555_astable.c
*
diff --git a/nl_examples/test.c b/nl_examples/test.c
index aee7bf9ec86..9a75dd3ad91 100644
--- a/nl_examples/test.c
+++ b/nl_examples/test.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* bjt.c
*
diff --git a/nl_examples/todo.c b/nl_examples/todo.c
index 1c9815864ed..62c713e86fd 100644
--- a/nl_examples/todo.c
+++ b/nl_examples/todo.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* todo.c
*
diff --git a/nl_examples/vccs.c b/nl_examples/vccs.c
index 3945734a5da..27ebf5a64e0 100644
--- a/nl_examples/vccs.c
+++ b/nl_examples/vccs.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* vccs.c
*
diff --git a/nl_examples/vccs1.c b/nl_examples/vccs1.c
index 72db7467d84..7e6dd1ea48c 100644
--- a/nl_examples/vccs1.c
+++ b/nl_examples/vccs1.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* vccs.c
*
diff --git a/nl_examples/vs_cs.c b/nl_examples/vs_cs.c
index 4e6bb9615fe..9b39106a540 100644
--- a/nl_examples/vs_cs.c
+++ b/nl_examples/vs_cs.c
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
/*
* vs_cs.c
*
diff --git a/plugins/README.md b/plugins/README.md
new file mode 100644
index 00000000000..bb222b77f68
--- /dev/null
+++ b/plugins/README.md
@@ -0,0 +1,3 @@
+# **Plugins** #
+
+LUA plugins contains code from various sources so license is per file. \ No newline at end of file
diff --git a/plugins/boot.lua b/plugins/boot.lua
index 4f8c6a0ee96..03b82c1dbba 100644
--- a/plugins/boot.lua
+++ b/plugins/boot.lua
@@ -1,6 +1,7 @@
+-- license:BSD-3-Clause
+-- copyright-holders:Miodrag Milanovic
require('lfs')
-local uv = require('luv')
-local cwd = uv.cwd()
+local cwd = lfs.currentdir()
package.path = cwd .. "/plugins/?.lua;" .. cwd .. "/plugins/?/init.lua"
local json = require('json')
diff --git a/plugins/coro-channel/LICENSE b/plugins/coro-channel/LICENSE
deleted file mode 100644
index 5789b767285..00000000000
--- a/plugins/coro-channel/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Tim Caswell
-
-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.
-
diff --git a/plugins/coro-channel/README.md b/plugins/coro-channel/README.md
deleted file mode 100644
index 3f5bb397c69..00000000000
--- a/plugins/coro-channel/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-coro-channel
-A luv port of creationix/coro-channel from lit.luvit.io
diff --git a/plugins/coro-channel/init.lua b/plugins/coro-channel/init.lua
deleted file mode 100644
index 0b715a0d470..00000000000
--- a/plugins/coro-channel/init.lua
+++ /dev/null
@@ -1,128 +0,0 @@
-local exports = {}
-exports.name = "creationix/coro-channel"
-exports.version = "1.2.0"
-exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-channel.lua"
-exports.description = "An adapter for wrapping uv streams as coro-streams and chaining filters."
-exports.tags = {"coro", "adapter"}
-exports.license = "MIT"
-exports.author = { name = "Tim Caswell" }
-
-local function wrapRead(socket)
- local paused = true
- local queue = {}
- local waiting
- local onRead
-
- function onRead(err, chunk)
- local data = err and {nil, err} or {chunk}
- if waiting then
- local thread = waiting
- waiting = nil
- assert(coroutine.resume(thread, unpack(data)))
- else
- queue[#queue + 1] = data
- if not paused then
- paused = true
- assert(socket:read_stop())
- end
- end
- end
-
- return function ()
- if #queue > 0 then
- return unpack(table.remove(queue, 1))
- end
- if paused then
- paused = false
- assert(socket:read_start(onRead))
- end
- waiting = coroutine.running()
- return coroutine.yield()
- end
-
-end
-
-local function wrapWrite(socket)
-
- local function wait()
- local thread = coroutine.running()
- return function (err)
- assert(coroutine.resume(thread, err))
- end
- end
-
- local function shutdown()
- socket:shutdown(wait())
- coroutine.yield()
- if not socket:is_closing() then
- socket:close()
- end
- end
-
- return function (chunk)
- if chunk == nil then
- return shutdown()
- end
- assert(socket:write(chunk, wait()))
- local err = coroutine.yield()
- return not err, err
- end
-
-end
-
-exports.wrapRead = wrapRead
-exports.wrapWrite = wrapWrite
-
--- Given a raw uv_stream_t userdata, return coro-friendly read/write functions.
-function exports.wrapStream(socket)
- return wrapRead(socket), wrapWrite(socket)
-end
-
-
-function exports.chain(...)
- local args = {...}
- local nargs = select("#", ...)
- return function (read, write)
- local threads = {} -- coroutine thread for each item
- local waiting = {} -- flag when waiting to pull from upstream
- local boxes = {} -- storage when waiting to write to downstream
- for i = 1, nargs do
- threads[i] = coroutine.create(args[i])
- waiting[i] = false
- local r, w
- if i == 1 then
- r = read
- else
- function r()
- local j = i - 1
- if boxes[j] then
- local data = boxes[j]
- boxes[j] = nil
- assert(coroutine.resume(threads[j]))
- return unpack(data)
- else
- waiting[i] = true
- return coroutine.yield()
- end
- end
- end
- if i == nargs then
- w = write
- else
- function w(...)
- local j = i + 1
- if waiting[j] then
- waiting[j] = false
- assert(coroutine.resume(threads[j], ...))
- else
- boxes[i] = {...}
- coroutine.yield()
- end
- end
- end
- assert(coroutine.resume(threads[i], r, w))
- end
- end
-end
-
-return exports
diff --git a/plugins/coro-channel/plugin.json b/plugins/coro-channel/plugin.json
deleted file mode 100644
index 5a3f5af8813..00000000000
--- a/plugins/coro-channel/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "coro-channel",
- "version": "1.2.0",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/coro-fs/LICENSE b/plugins/coro-fs/LICENSE
deleted file mode 100644
index 5789b767285..00000000000
--- a/plugins/coro-fs/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Tim Caswell
-
-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.
-
diff --git a/plugins/coro-fs/README.md b/plugins/coro-fs/README.md
deleted file mode 100644
index 79ef57330a0..00000000000
--- a/plugins/coro-fs/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-coro-fs
-A luv port of lit's coro-fs module
diff --git a/plugins/coro-fs/init.lua b/plugins/coro-fs/init.lua
deleted file mode 100644
index f4be5bff832..00000000000
--- a/plugins/coro-fs/init.lua
+++ /dev/null
@@ -1,222 +0,0 @@
-local exports = {}
-exports.name = "creationix/coro-fs"
-exports.version = "1.3.0"
-exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-fs.lua"
-exports.description = "A coro style interface to the filesystem."
-exports.tags = {"coro", "fs"}
-exports.license = "MIT"
-exports.author = { name = "Tim Caswell" }
-
-local uv = require('luv')
-local fs = exports
-local pathJoin = require('path').join
-
-local function noop() end
-
-local function makeCallback()
- local thread = coroutine.running()
- return function (err, value, ...)
- if err then
- assert(coroutine.resume(thread, nil, err))
- else
- assert(coroutine.resume(thread, value == nil and true or value, ...))
- end
- end
-end
-
-function fs.mkdir(path, mode)
- uv.fs_mkdir(path, mode or 511, makeCallback())
- return coroutine.yield()
-end
-function fs.open(path, flags, mode)
- uv.fs_open(path, flags or "r", mode or 438, makeCallback())
- return coroutine.yield()
-end
-function fs.unlink(path)
- uv.fs_unlink(path, makeCallback())
- return coroutine.yield()
-end
-function fs.stat(path)
- uv.fs_stat(path, makeCallback())
- return coroutine.yield()
-end
-function fs.lstat(path)
- uv.fs_lstat(path, makeCallback())
- return coroutine.yield()
-end
-function fs.symlink(target, path)
- uv.fs_symlink(target, path, makeCallback())
- return coroutine.yield()
-end
-function fs.readlink(path)
- uv.fs_readlink(path, makeCallback())
- return coroutine.yield()
-end
-function fs.fstat(fd)
- uv.fs_fstat(fd, makeCallback())
- return coroutine.yield()
-end
-function fs.chmod(fd, path)
- uv.fs_chmod(fd, path, makeCallback())
- return coroutine.yield()
-end
-function fs.fchmod(fd, mode)
- uv.fs_fchmod(fd, mode, makeCallback())
- return coroutine.yield()
-end
-function fs.read(fd, length, offset)
- uv.fs_read(fd, length or 1024*48, offset or -1, makeCallback())
- return coroutine.yield()
-end
-function fs.write(fd, data, offset)
- uv.fs_write(fd, data, offset or -1, makeCallback())
- return coroutine.yield()
-end
-function fs.close(fd)
- uv.fs_close(fd, makeCallback())
- return coroutine.yield()
-end
-function fs.access(path, flags)
- uv.fs_access(path, flags or "", makeCallback())
- return coroutine.yield()
-end
-function fs.rename(path, newPath)
- uv.fs_rename(path, newPath, makeCallback())
- return coroutine.yield()
-end
-function fs.rmdir(path)
- uv.fs_rmdir(path, makeCallback())
- return coroutine.yield()
-end
-function fs.rmrf(path)
- local success, err
- success, err = fs.rmdir(path)
- if success then return success end
- if err:match("^ENOTDIR:") then return fs.unlink(path) end
- if not err:match("^ENOTEMPTY:") then return success, err end
- for entry in assert(fs.scandir(path)) do
- local subPath = pathJoin(path, entry.name)
- if entry.type == "directory" then
- success, err = fs.rmrf(pathJoin(path, entry.name))
- else
- success, err = fs.unlink(subPath)
- end
- if not success then return success, err end
- end
- return fs.rmdir(path)
-end
-function fs.scandir(path)
- uv.fs_scandir(path, makeCallback())
- local req, err = coroutine.yield()
- if not req then return nil, err end
- return function ()
- return uv.fs_scandir_next(req)
- end
-end
-
-function fs.readFile(path)
- local fd, stat, data, err
- fd, err = fs.open(path)
- if err then return nil, err end
- stat, err = fs.fstat(fd)
- if stat then
- data, err = fs.read(fd, stat.size)
- end
- uv.fs_close(fd, noop)
- return data, err
-end
-
-function fs.writeFile(path, data, mkdir)
- local fd, success, err
- fd, err = fs.open(path, "w")
- if err then
- if mkdir and string.match(err, "^ENOENT:") then
- success, err = fs.mkdirp(pathJoin(path, ".."))
- if success then return fs.writeFile(path, data) end
- end
- return nil, err
- end
- success, err = fs.write(fd, data)
- uv.fs_close(fd, noop)
- return success, err
-end
-
-function fs.mkdirp(path, mode)
- local success, err = fs.mkdir(path, mode)
- if success or string.match(err, "^EEXIST") then
- return true
- end
- if string.match(err, "^ENOENT:") then
- success, err = fs.mkdirp(pathJoin(path, ".."), mode)
- if not success then return nil, err end
- return fs.mkdir(path, mode)
- end
- return nil, err
-end
-
-function fs.chroot(base)
- local chroot = {
- base = base,
- fstat = fs.fstat,
- fchmod = fs.fchmod,
- read = fs.read,
- write = fs.write,
- close = fs.close,
- }
- local function resolve(path)
- assert(path, "path missing")
- return pathJoin(base, pathJoin(path))
- end
- function chroot.mkdir(path, mode)
- return fs.mkdir(resolve(path), mode)
- end
- function chroot.mkdirp(path, mode)
- return fs.mkdirp(resolve(path), mode)
- end
- function chroot.open(path, flags, mode)
- return fs.open(resolve(path), flags, mode)
- end
- function chroot.unlink(path)
- return fs.unlink(resolve(path))
- end
- function chroot.stat(path)
- return fs.stat(resolve(path))
- end
- function chroot.lstat(path)
- return fs.lstat(resolve(path))
- end
- function chroot.symlink(target, path)
- -- TODO: should we resolve absolute target paths or treat it as opaque data?
- return fs.symlink(target, resolve(path))
- end
- function chroot.readlink(path)
- return fs.readlink(resolve(path))
- end
- function chroot.chmod(path, mode)
- return fs.chmod(resolve(path), mode)
- end
- function chroot.access(path, flags)
- return fs.access(resolve(path), flags)
- end
- function chroot.rename(path, newPath)
- return fs.rename(resolve(path), resolve(newPath))
- end
- function chroot.rmdir(path)
- return fs.rmdir(resolve(path))
- end
- function chroot.rmrf(path)
- return fs.rmrf(resolve(path))
- end
- function chroot.scandir(path, iter)
- return fs.scandir(resolve(path), iter)
- end
- function chroot.readFile(path)
- return fs.readFile(resolve(path))
- end
- function chroot.writeFile(path, data, mkdir)
- return fs.writeFile(resolve(path), data, mkdir)
- end
- return chroot
-end
-
-return exports
diff --git a/plugins/coro-fs/plugin.json b/plugins/coro-fs/plugin.json
deleted file mode 100644
index c35d9e27315..00000000000
--- a/plugins/coro-fs/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "coro-fs",
- "version": "1.3.0",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/coro-http/LICENSE b/plugins/coro-http/LICENSE
deleted file mode 100644
index 5789b767285..00000000000
--- a/plugins/coro-http/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Tim Caswell
-
-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.
-
diff --git a/plugins/coro-http/README.md b/plugins/coro-http/README.md
deleted file mode 100644
index 271b6698f5d..00000000000
--- a/plugins/coro-http/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-coro-http
-A luv port of lit's coro-http library.
diff --git a/plugins/coro-http/init.lua b/plugins/coro-http/init.lua
deleted file mode 100644
index 49613403eaf..00000000000
--- a/plugins/coro-http/init.lua
+++ /dev/null
@@ -1,187 +0,0 @@
-local exports = {}
-exports.name = "creationix/coro-http"
-exports.version = "1.2.1-1"
-exports.dependencies = {
- "creationix/coro-net@1.1.1",
- "creationix/coro-tls@1.2.1",
- "creationix/coro-wrapper@1.0.0",
- "luvit/http-codec@1.0.0"
-}
-exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-http.lua"
-exports.description = "An coro style http(s) client and server helper."
-exports.tags = {"coro", "http"}
-exports.license = "MIT"
-exports.author = { name = "Tim Caswell" }
-
-local httpCodec = require('http-codec')
-local net = require('coro-net')
-local connect = net.connect
-local createServer = net.createServer
---local tlsWrap = require('coro-tls').wrap
-local wrapper = require('coro-wrapper')
-
-function exports.createServer(options, onConnect)
- createServer(options, function (rawRead, rawWrite, socket)
- local read = wrapper.reader(rawRead, httpCodec.decoder())
- local write = wrapper.writer(rawWrite, httpCodec.encoder())
- for head in read do
- local parts = {}
- for part in read do
- if #part > 0 then
- parts[#parts + 1] = part
- else
- break
- end
- end
- local body = table.concat(parts)
- head, body = onConnect(head, body, socket)
- write(head)
- if body then write(body) end
- write("")
- if not head.keepAlive then break end
- end
- end)
-end
-
-local function parseUrl(url)
- local protocol, host, hostname, port, path = url:match("^(https?:)//(([^/:]+):?([0-9]*))(/?.*)$")
- if not protocol then error("Not a valid http url: " .. url) end
- local tls = protocol == "https:"
- port = port and tonumber(port) or (tls and 443 or 80)
- if path == "" then path = "/" end
- return {
- tls = tls,
- host = host,
- hostname = hostname,
- port = port,
- path = path
- }
-end
-exports.parseUrl = parseUrl
-
-local connections = {}
-
-local function getConnection(host, port, tls)
- for i = #connections, 1, -1 do
- local connection = connections[i]
- if connection.host == host and connection.port == port and connection.tls == tls then
- table.remove(connections, i)
- -- Make sure the connection is still alive before reusing it.
- if not connection.socket:is_closing() then
- connection.reused = true
- connection.socket:ref()
- return connection
- end
- end
- end
- local read, write, socket = assert(connect({host=host,port=port}))
- --if tls then
- --read, write = tlsWrap(read, write)
- --end
- local httpRead, updateRead = wrapper.reader(read, httpCodec.decoder())
- return {
- socket = socket,
- host = host,
- port = port,
- tls = tls,
- read = httpRead,
- write = wrapper.writer(write, httpCodec.encoder()),
- reset = function ()
- -- This is called after parsing the response head from a HEAD request.
- -- If you forget, the codec might hang waiting for a body that doesn't exist.
- updateRead(httpCodec.decoder())
- end
- }
-end
-exports.getConnection = getConnection
-
-local function saveConnection(connection)
- if connection.socket:is_closing() then return end
- connections[#connections + 1] = connection
- connection.socket:unref()
-end
-exports.saveConnection = saveConnection
-
-function exports.request(method, url, headers, body)
- local uri = parseUrl(url)
- local connection = getConnection(uri.hostname, uri.port, uri.tls)
- local read = connection.read
- local write = connection.write
-
- local req = {
- method = method,
- path = uri.path,
- {"Host", uri.host}
- }
- local contentLength
- local chunked
- if headers then
- for i = 1, #headers do
- local key, value = unpack(headers[i])
- key = key:lower()
- if key == "content-length" then
- contentLength = value
- elseif key == "content-encoding" and value:lower() == "chunked" then
- chunked = true
- end
- req[#req + 1] = headers[i]
- end
- end
-
- if type(body) == "string" then
- if not chunked and not contentLength then
- req[#req + 1] = {"Content-Length", #body}
- end
- end
-
- write(req)
- if body then write(body) end
- local res = read()
- if not res then
- write()
- -- If we get an immediate close on a reused socket, try again with a new socket.
- -- TODO: think about if this could resend requests with side effects and cause
- -- them to double execute in the remote server.
- if connection.reused then
- return exports.request(method, url, headers, body)
- end
- error("Connection closed")
- end
-
- body = {}
- if req.method == "HEAD" then
- connection.reset()
- else
- while true do
- local item = read()
- if not item then
- res.keepAlive = false
- break
- end
- if #item == 0 then
- break
- end
- body[#body + 1] = item
- end
- end
-
- if res.keepAlive then
- saveConnection(connection)
- else
- write()
- end
-
- -- Follow redirects
- if method == "GET" and (res.code == 302 or res.code == 307) then
- for i = 1, #res do
- local key, location = unpack(res[i])
- if key:lower() == "location" then
- return exports.request(method, location, headers)
- end
- end
- end
-
- return res, table.concat(body)
-end
-
-return exports
diff --git a/plugins/coro-http/plugin.json b/plugins/coro-http/plugin.json
deleted file mode 100644
index 0c8047c9ebe..00000000000
--- a/plugins/coro-http/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "coro-http",
- "version": "1.2.1-1",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/coro-net/LICENSE b/plugins/coro-net/LICENSE
deleted file mode 100644
index 5789b767285..00000000000
--- a/plugins/coro-net/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Tim Caswell
-
-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.
-
diff --git a/plugins/coro-net/README.md b/plugins/coro-net/README.md
deleted file mode 100644
index c8a94b9980a..00000000000
--- a/plugins/coro-net/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-coro-net
-A luv port of creationix/coro-net from lit.luvit.io
diff --git a/plugins/coro-net/init.lua b/plugins/coro-net/init.lua
deleted file mode 100644
index 3ae6c2ad824..00000000000
--- a/plugins/coro-net/init.lua
+++ /dev/null
@@ -1,113 +0,0 @@
-local exports = {}
-exports.name = "creationix/coro-net"
-exports.version = "1.1.1-1"
-exports.dependencies = {
- "creationix/coro-channel@1.2.0"
-}
-exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-net.lua"
-exports.description = "An coro style client and server helper for tcp and pipes."
-exports.tags = {"coro", "tcp", "pipe", "net"}
-exports.license = "MIT"
-exports.author = { name = "Tim Caswell" }
-
-local uv = require('luv')
-local wrapStream = require('coro-channel').wrapStream
-
-local function makeCallback(timeout)
- local thread = coroutine.running()
- local timer, done
- if timeout then
- timer = uv.new_timer()
- timer:start(timeout, 0, function ()
- if done then return end
- done = true
- timer:close()
- return assert(coroutine.resume(thread, nil, "timeout"))
- end)
- end
- return function (err, data)
- if done then return end
- done = true
- if timer then timer:close() end
- if err then
- return assert(coroutine.resume(thread, nil, err))
- end
- return assert(coroutine.resume(thread, data or true))
- end
-end
-exports.makeCallback = makeCallback
-
-local function normalize(options)
- local t = type(options)
- if t == "string" then
- options = {path=options}
- elseif t == "number" then
- options = {port=options}
- elseif t ~= "table" then
- assert("Net options must be table, string, or number")
- end
- if options.port or options.host then
- return true,
- options.host or "127.0.0.1",
- assert(options.port, "options.port is required for tcp connections")
- elseif options.path then
- return false, options.path
- else
- error("Must set either options.path or options.port")
- end
-end
-
-function exports.connect(options)
- local socket, success, err
- local isTcp, host, port = normalize(options)
- if isTcp then
- assert(uv.getaddrinfo(host, port, {
- socktype = options.socktype or "stream",
- family = options.family or "inet",
- }, makeCallback(options.timeout)))
- local res
- res, err = coroutine.yield()
- if not res then return nil, err end
- socket = uv.new_tcp()
- socket:connect(res[1].addr, res[1].port, makeCallback(options.timeout))
- else
- socket = uv.new_pipe(false)
- socket:connect(host, makeCallback(options.timeout))
- end
- success, err = coroutine.yield()
- if not success then return nil, err end
- local read, write = wrapStream(socket)
- return read, write, socket
-end
-
-function exports.createServer(options, onConnect)
- local server
- local isTcp, host, port = normalize(options)
- if isTcp then
- server = uv.new_tcp()
- assert(server:bind(host, port))
- else
- server = uv.new_pipe(false)
- assert(server:bind(host))
- end
- assert(server:listen(256, function (err)
- assert(not err, err)
- local socket = isTcp and uv.new_tcp() or uv.new_pipe(false)
- server:accept(socket)
- coroutine.wrap(function ()
- local success, failure = xpcall(function ()
- local read, write = wrapStream(socket)
- return onConnect(read, write, socket)
- end, debug.traceback)
- if not success then
- print(failure)
- end
- if not socket:is_closing() then
- socket:close()
- end
- end)()
- end))
- return server
-end
-
-return exports
diff --git a/plugins/coro-net/plugin.json b/plugins/coro-net/plugin.json
deleted file mode 100644
index cf839aad881..00000000000
--- a/plugins/coro-net/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "coro-net",
- "version": "1.1.1-1",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/coro-tls/LICENSE b/plugins/coro-tls/LICENSE
deleted file mode 100644
index 5789b767285..00000000000
--- a/plugins/coro-tls/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Tim Caswell
-
-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.
-
diff --git a/plugins/coro-tls/README.md b/plugins/coro-tls/README.md
deleted file mode 100644
index 50aae3f7657..00000000000
--- a/plugins/coro-tls/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-coro-tls
-A luv port of lit's coro-tls module
diff --git a/plugins/coro-tls/init.lua b/plugins/coro-tls/init.lua
deleted file mode 100644
index 03d6e1c3f76..00000000000
--- a/plugins/coro-tls/init.lua
+++ /dev/null
@@ -1,122 +0,0 @@
-local exports = {}
-exports.name = "creationix/coro-tls"
-exports.version = "1.2.1"
-exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-tls.lua"
-exports.description = "A coro-stream wrapper implementing tls sessions."
-exports.tags = {"coro", "tls", "ssl"}
-exports.license = "MIT"
-exports.author = { name = "Tim Caswell" }
-
-local openssl = require('openssl')
-local bit = require('bit')
-
-local DEFAULT_CIPHERS = 'ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:' .. -- TLS 1.2
- 'RC4:HIGH:!MD5:!aNULL:!EDH' -- TLS 1.0
-
--- Given a read/write pair, return a new read/write pair for plaintext
-exports.wrap = function (read, write, options)
- if not options then
- options = {}
- end
-
- local ctx = openssl.ssl.ctx_new(options.protocol or 'TLSv1_2', options.ciphers or DEFAULT_CIPHERS)
-
- local key, cert, ca
- if options.key then
- key = assert(openssl.pkey.read(options.key, true, 'pem'))
- end
- if options.cert then
- cert = assert(openssl.x509.read(options.cert))
- end
- if options.ca then
- if type(options.ca) == "string" then
- ca = { assert(openssl.x509.read(options.ca)) }
- elseif type(options.ca) == "table" then
- ca = {}
- for i = 1, #options.ca do
- ca[i] = assert(openssl.x509.read(options.ca[i]))
- end
- else
- error("options.ca must be string or table of strings")
- end
- end
- if key and cert then
- assert(ctx:use(key, cert))
- end
- if ca then
- local store = openssl.x509.store:new()
- for i = 1, #ca do
- assert(store:add(ca[i]))
- end
- ctx:cert_store(store)
- else
- ctx:verify_mode({"none"})
- end
-
- ctx:options(bit.bor(
- openssl.ssl.no_sslv2,
- openssl.ssl.no_sslv3,
- openssl.ssl.no_compression))
- local bin, bout = openssl.bio.mem(8192), openssl.bio.mem(8192)
- local ssl = ctx:ssl(bin, bout, options.server)
-
- local function flush()
- while bout:pending() > 0 do
- write(bout:read())
- end
- end
-
- -- Do handshake
- while true do
- if ssl:handshake() then break end
- flush()
- local chunk = read()
- if chunk then
- bin:write(chunk)
- else
- error("disconnect while handshaking")
- end
- end
- flush()
-
- local done = false
- local function shutdown()
- if done then return end
- done = true
- while true do
- if ssl:shutdown() then break end
- flush()
- local chunk = read()
- if chunk then
- bin:write(chunk)
- else
- break
- end
- end
- flush()
- write()
- end
-
- local function plainRead()
- while true do
- local chunk = ssl:read()
- if chunk then return chunk end
- local cipher = read()
- if not cipher then return end
- bin:write(cipher)
- end
- end
-
- local function plainWrite(plain)
- if not plain then
- return shutdown()
- end
- ssl:write(plain)
- flush()
- end
-
- return plainRead, plainWrite
-
-end
-
-return exports
diff --git a/plugins/coro-tls/plugin.json b/plugins/coro-tls/plugin.json
deleted file mode 100644
index 257224e2ea3..00000000000
--- a/plugins/coro-tls/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "coro-tls",
- "version": "1.2.1",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/coro-wrapper/LICENSE b/plugins/coro-wrapper/LICENSE
deleted file mode 100644
index 5789b767285..00000000000
--- a/plugins/coro-wrapper/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Tim Caswell
-
-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.
-
diff --git a/plugins/coro-wrapper/README.md b/plugins/coro-wrapper/README.md
deleted file mode 100644
index a9351a7f531..00000000000
--- a/plugins/coro-wrapper/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-coro-wrapper
-A luv port of lit's coro-wrapper module
diff --git a/plugins/coro-wrapper/init.lua b/plugins/coro-wrapper/init.lua
deleted file mode 100644
index aab2683baf3..00000000000
--- a/plugins/coro-wrapper/init.lua
+++ /dev/null
@@ -1,41 +0,0 @@
-local exports = {}
-exports.name = "creationix/coro-wrapper"
-exports.version = "1.0.0-1"
-exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-wrapper.lua"
-exports.description = "An adapter for applying decoders to coro-streams."
-exports.tags = {"coro", "decoder", "adapter"}
-exports.license = "MIT"
-exports.author = { name = "Tim Caswell" }
-
-function exports.reader(read, decode)
- local buffer = ""
- return function ()
- while true do
- local item, extra = decode(buffer)
- if item then
- buffer = extra
- return item
- end
- local chunk = read()
- if not chunk then return end
- buffer = buffer .. chunk
- end
- end,
- function (newDecode)
- decode = newDecode
- end
-end
-
-function exports.writer(write, encode)
- return function (item)
- if not item then
- return write()
- end
- return write(encode(item))
- end,
- function (newEncode)
- encode = newEncode
- end
-end
-
-return exports
diff --git a/plugins/coro-wrapper/plugin.json b/plugins/coro-wrapper/plugin.json
deleted file mode 100644
index 6075edba1fa..00000000000
--- a/plugins/coro-wrapper/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "coro-wrapper",
- "version": "1.0.0-1",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/dummy/init.lua b/plugins/dummy/init.lua
index 8c4fbe6a0f5..3ef8fe3fc0b 100644
--- a/plugins/dummy/init.lua
+++ b/plugins/dummy/init.lua
@@ -1,8 +1,10 @@
+-- license:BSD-3-Clause
+-- copyright-holders:Miodrag Milanovic
local exports = {}
exports.name = "dummy"
exports.version = "0.0.1"
exports.description = "A dummy example"
-exports.license = "MIT"
+exports.license = "The BSD 3-Clause License"
exports.author = { name = "Miodrag Milanovic" }
local dummy = exports
diff --git a/plugins/http-codec/LICENSE b/plugins/http-codec/LICENSE
deleted file mode 100644
index 8f71f43fee3..00000000000
--- a/plugins/http-codec/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
diff --git a/plugins/http-codec/README.md b/plugins/http-codec/README.md
deleted file mode 100644
index 80d050416ae..00000000000
--- a/plugins/http-codec/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-http-codec
-A luv port of luvit's http-codec
diff --git a/plugins/http-codec/init.lua b/plugins/http-codec/init.lua
deleted file mode 100644
index 11a32945729..00000000000
--- a/plugins/http-codec/init.lua
+++ /dev/null
@@ -1,291 +0,0 @@
---[[
-
-Copyright 2014-2015 The Luvit Authors. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS-IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
---]]
-
-local exports = {}
-
-exports.name = "luvit/http-codec"
-exports.version = "1.0.0-1"
-exports.homepage = "https://github.com/luvit/luvit/blob/master/deps/http-codec.lua"
-exports.description = "A simple pair of functions for converting between hex and raw strings."
-exports.tags = {"codec", "http"}
-exports.license = "Apache 2"
-exports.author = { name = "Tim Caswell" }
-
-local sub = string.sub
-local gsub = string.gsub
-local lower = string.lower
-local find = string.find
-local format = string.format
-local concat = table.concat
-local match = string.match
-
-local STATUS_CODES = {
- [100] = 'Continue',
- [101] = 'Switching Protocols',
- [102] = 'Processing', -- RFC 2518, obsoleted by RFC 4918
- [200] = 'OK',
- [201] = 'Created',
- [202] = 'Accepted',
- [203] = 'Non-Authoritative Information',
- [204] = 'No Content',
- [205] = 'Reset Content',
- [206] = 'Partial Content',
- [207] = 'Multi-Status', -- RFC 4918
- [300] = 'Multiple Choices',
- [301] = 'Moved Permanently',
- [302] = 'Moved Temporarily',
- [303] = 'See Other',
- [304] = 'Not Modified',
- [305] = 'Use Proxy',
- [307] = 'Temporary Redirect',
- [400] = 'Bad Request',
- [401] = 'Unauthorized',
- [402] = 'Payment Required',
- [403] = 'Forbidden',
- [404] = 'Not Found',
- [405] = 'Method Not Allowed',
- [406] = 'Not Acceptable',
- [407] = 'Proxy Authentication Required',
- [408] = 'Request Time-out',
- [409] = 'Conflict',
- [410] = 'Gone',
- [411] = 'Length Required',
- [412] = 'Precondition Failed',
- [413] = 'Request Entity Too Large',
- [414] = 'Request-URI Too Large',
- [415] = 'Unsupported Media Type',
- [416] = 'Requested Range Not Satisfiable',
- [417] = 'Expectation Failed',
- [418] = "I'm a teapot", -- RFC 2324
- [422] = 'Unprocessable Entity', -- RFC 4918
- [423] = 'Locked', -- RFC 4918
- [424] = 'Failed Dependency', -- RFC 4918
- [425] = 'Unordered Collection', -- RFC 4918
- [426] = 'Upgrade Required', -- RFC 2817
- [500] = 'Internal Server Error',
- [501] = 'Not Implemented',
- [502] = 'Bad Gateway',
- [503] = 'Service Unavailable',
- [504] = 'Gateway Time-out',
- [505] = 'HTTP Version not supported',
- [506] = 'Variant Also Negotiates', -- RFC 2295
- [507] = 'Insufficient Storage', -- RFC 4918
- [509] = 'Bandwidth Limit Exceeded',
- [510] = 'Not Extended' -- RFC 2774
-}
-
-exports.encoder = function ()
-
- local mode
- local encodeHead, encodeRaw, encodeChunked
-
- function encodeHead(item)
- if not item or item == "" then
- return item
- elseif not (type(item) == "table") then
- error("expected a table but got a " .. type(item) .. " when encoding data")
- end
- local head, chunkedEncoding
- local version = item.version or 1.1
- if item.method then
- local path = item.path
- assert(path and #path > 0, "expected non-empty path")
- head = { item.method .. ' ' .. item.path .. ' HTTP/' .. version .. '\r\n' }
- else
- local reason = item.reason or STATUS_CODES[item.code]
- head = { 'HTTP/' .. version .. ' ' .. item.code .. ' ' .. reason .. '\r\n' }
- end
- for i = 1, #item do
- local key, value = unpack(item[i])
- local lowerKey = lower(key)
- if lowerKey == "transfer-encoding" then
- chunkedEncoding = lower(value) == "chunked"
- end
- value = gsub(tostring(value), "[\r\n]+", " ")
- head[#head + 1] = key .. ': ' .. tostring(value) .. '\r\n'
- end
- head[#head + 1] = '\r\n'
-
- mode = chunkedEncoding and encodeChunked or encodeRaw
- return concat(head)
- end
-
- function encodeRaw(item)
- if type(item) ~= "string" then
- mode = encodeHead
- return encodeHead(item)
- end
- return item
- end
-
- function encodeChunked(item)
- if type(item) ~= "string" then
- mode = encodeHead
- local extra = encodeHead(item)
- if extra then
- return "0\r\n\r\n" .. extra
- else
- return "0\r\n\r\n"
- end
- end
- if #item == 0 then
- mode = encodeHead
- end
- return format("%x", #item) .. "\r\n" .. item .. "\r\n"
- end
-
- mode = encodeHead
- return function (item)
- return mode(item)
- end
-end
-
-exports.decoder = function ()
-
- -- This decoder is somewhat stateful with 5 different parsing states.
- local decodeHead, decodeEmpty, decodeRaw, decodeChunked, decodeCounted
- local mode -- state variable that points to various decoders
- local bytesLeft -- For counted decoder
-
- -- This state is for decoding the status line and headers.
- function decodeHead(chunk)
- if not chunk then return end
-
- local _, length = find(chunk, "\r?\n\r?\n", 1)
- -- First make sure we have all the head before continuing
- if not length then
- if #chunk < 8 * 1024 then return end
- -- But protect against evil clients by refusing heads over 8K long.
- error("entity too large")
- end
-
- -- Parse the status/request line
- local head = {}
- local _, offset
- local version
- _, offset, version, head.code, head.reason =
- find(chunk, "^HTTP/(%d%.%d) (%d+) ([^\r\n]+)\r?\n")
- if offset then
- head.code = tonumber(head.code)
- else
- _, offset, head.method, head.path, version =
- find(chunk, "^(%u+) ([^ ]+) HTTP/(%d%.%d)\r?\n")
- if not offset then
- error("expected HTTP data")
- end
- end
- version = tonumber(version)
- head.version = version
- head.keepAlive = version > 1.0
-
- -- We need to inspect some headers to know how to parse the body.
- local contentLength
- local chunkedEncoding
-
- -- Parse the header lines
- while true do
- local key, value
- _, offset, key, value = find(chunk, "^([^:\r\n]+): *([^\r\n]+)\r?\n", offset + 1)
- if not offset then break end
- local lowerKey = lower(key)
-
- -- Inspect a few headers and remember the values
- if lowerKey == "content-length" then
- contentLength = tonumber(value)
- elseif lowerKey == "transfer-encoding" then
- chunkedEncoding = lower(value) == "chunked"
- elseif lowerKey == "connection" then
- head.keepAlive = lower(value) == "keep-alive"
- end
- head[#head + 1] = {key, value}
- end
-
- if head.keepAlive and (not (chunkedEncoding or (contentLength and contentLength > 0)))
- or (head.method == "GET" or head.method == "HEAD") then
- mode = decodeEmpty
- elseif chunkedEncoding then
- mode = decodeChunked
- elseif contentLength then
- bytesLeft = contentLength
- mode = decodeCounted
- elseif not head.keepAlive then
- mode = decodeRaw
- end
-
- return head, sub(chunk, length + 1)
-
- end
-
- -- This is used for inserting a single empty string into the output string for known empty bodies
- function decodeEmpty(chunk)
- mode = decodeHead
- return "", chunk or ""
- end
-
- function decodeRaw(chunk)
- if not chunk then return "", "" end
- if #chunk == 0 then return end
- return chunk, ""
- end
-
- function decodeChunked(chunk)
- local len, term
- len, term = match(chunk, "^(%x+)(..)")
- if not len then return end
- assert(term == "\r\n")
- local length = tonumber(len, 16)
- if #chunk < length + 4 + #len then return end
- if length == 0 then
- mode = decodeHead
- end
- chunk = sub(chunk, #len + 3)
- assert(sub(chunk, length + 1, length + 2) == "\r\n")
- return sub(chunk, 1, length), sub(chunk, length + 3)
- end
-
- function decodeCounted(chunk)
- if bytesLeft == 0 then
- mode = decodeEmpty
- return mode(chunk)
- end
- local length = #chunk
- -- Make sure we have at least one byte to process
- if length == 0 then return end
-
- if length >= bytesLeft then
- mode = decodeEmpty
- end
-
- -- If the entire chunk fits, pass it all through
- if length <= bytesLeft then
- bytesLeft = bytesLeft - length
- return chunk, ""
- end
-
- return sub(chunk, 1, bytesLeft), sub(chunk, bytesLeft + 1)
- end
-
- -- Switch between states by changing which decoder mode points to
- mode = decodeHead
- return function (chunk)
- return mode(chunk)
- end
-
-end
-
-return exports
diff --git a/plugins/http-codec/plugin.json b/plugins/http-codec/plugin.json
deleted file mode 100644
index ce511afa785..00000000000
--- a/plugins/http-codec/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "http-codec",
- "version": "1.0.0-1",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/json/init.lua b/plugins/json/init.lua
index d49352cc6ff..39f211c8e11 100644
--- a/plugins/json/init.lua
+++ b/plugins/json/init.lua
@@ -1,3 +1,6 @@
+-- license:MIT
+-- copyright-holders:David Kolf
+
local exports = {}
exports.name = "luvit/json"
exports.version = "2.5.0"
diff --git a/plugins/mime/LICENSE b/plugins/mime/LICENSE
deleted file mode 100644
index 5789b767285..00000000000
--- a/plugins/mime/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Tim Caswell
-
-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.
-
diff --git a/plugins/mime/README.md b/plugins/mime/README.md
deleted file mode 100644
index 550ba582b69..00000000000
--- a/plugins/mime/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-mime
-A luv port of weblit's mime module
diff --git a/plugins/mime/init.lua b/plugins/mime/init.lua
deleted file mode 100644
index ac41dad1cfc..00000000000
--- a/plugins/mime/init.lua
+++ /dev/null
@@ -1,194 +0,0 @@
-local exports = {}
-exports.name = "creationix/mime"
-exports.version = "0.1.2-1"
-exports.description = "A simple mime type database useful for serving static files over http."
-exports.tags = {"mime", "static"}
-exports.license = "MIT"
-exports.author = { name = "Tim Caswell" }
-exports.homepage = "https://github.com/creationix/weblit/blob/master/libs/mime.lua"
-
-local mime = exports
-local table = {
- ["3gp"] = "video/3gpp",
- a = "application/octet-stream",
- ai = "application/postscript",
- aif = "audio/x-aiff",
- aiff = "audio/x-aiff",
- asc = "application/pgp-signature",
- asf = "video/x-ms-asf",
- asm = "text/x-asm",
- asx = "video/x-ms-asf",
- atom = "application/atom+xml",
- au = "audio/basic",
- avi = "video/x-msvideo",
- bat = "application/x-msdownload",
- bin = "application/octet-stream",
- bmp = "image/bmp",
- bz2 = "application/x-bzip2",
- c = "text/x-c",
- cab = "application/vnd.ms-cab-compressed",
- cc = "text/x-c",
- chm = "application/vnd.ms-htmlhelp",
- class = "application/octet-stream",
- com = "application/x-msdownload",
- conf = "text/plain",
- cpp = "text/x-c",
- crt = "application/x-x509-ca-cert",
- css = "text/css",
- csv = "text/csv",
- cxx = "text/x-c",
- deb = "application/x-debian-package",
- der = "application/x-x509-ca-cert",
- diff = "text/x-diff",
- djv = "image/vnd.djvu",
- djvu = "image/vnd.djvu",
- dll = "application/x-msdownload",
- dmg = "application/octet-stream",
- doc = "application/msword",
- dot = "application/msword",
- dtd = "application/xml-dtd",
- dvi = "application/x-dvi",
- ear = "application/java-archive",
- eml = "message/rfc822",
- eps = "application/postscript",
- exe = "application/x-msdownload",
- f = "text/x-fortran",
- f77 = "text/x-fortran",
- f90 = "text/x-fortran",
- flv = "video/x-flv",
- ["for"] = "text/x-fortran",
- gem = "application/octet-stream",
- gemspec = "text/x-script.ruby",
- gif = "image/gif",
- gz = "application/x-gzip",
- h = "text/x-c",
- hh = "text/x-c",
- htm = "text/html",
- html = "text/html",
- ico = "image/vnd.microsoft.icon",
- ics = "text/calendar",
- ifb = "text/calendar",
- iso = "application/octet-stream",
- jar = "application/java-archive",
- java = "text/x-java-source",
- jnlp = "application/x-java-jnlp-file",
- jpeg = "image/jpeg",
- jpg = "image/jpeg",
- js = "application/javascript",
- json = "application/json",
- less = "text/css",
- log = "text/plain",
- lua = "text/x-lua",
- luac = "application/x-lua-bytecode",
- m3u = "audio/x-mpegurl",
- m4v = "video/mp4",
- man = "text/troff",
- manifest = "text/cache-manifest",
- markdown = "text/markdown",
- mathml = "application/mathml+xml",
- mbox = "application/mbox",
- mdoc = "text/troff",
- md = "text/markdown",
- me = "text/troff",
- mid = "audio/midi",
- midi = "audio/midi",
- mime = "message/rfc822",
- mml = "application/mathml+xml",
- mng = "video/x-mng",
- mov = "video/quicktime",
- mp3 = "audio/mpeg",
- mp4 = "video/mp4",
- mp4v = "video/mp4",
- mpeg = "video/mpeg",
- mpg = "video/mpeg",
- ms = "text/troff",
- msi = "application/x-msdownload",
- odp = "application/vnd.oasis.opendocument.presentation",
- ods = "application/vnd.oasis.opendocument.spreadsheet",
- odt = "application/vnd.oasis.opendocument.text",
- ogg = "application/ogg",
- p = "text/x-pascal",
- pas = "text/x-pascal",
- pbm = "image/x-portable-bitmap",
- pdf = "application/pdf",
- pem = "application/x-x509-ca-cert",
- pgm = "image/x-portable-graymap",
- pgp = "application/pgp-encrypted",
- pkg = "application/octet-stream",
- pl = "text/x-script.perl",
- pm = "text/x-script.perl-module",
- png = "image/png",
- pnm = "image/x-portable-anymap",
- ppm = "image/x-portable-pixmap",
- pps = "application/vnd.ms-powerpoint",
- ppt = "application/vnd.ms-powerpoint",
- ps = "application/postscript",
- psd = "image/vnd.adobe.photoshop",
- py = "text/x-script.python",
- qt = "video/quicktime",
- ra = "audio/x-pn-realaudio",
- rake = "text/x-script.ruby",
- ram = "audio/x-pn-realaudio",
- rar = "application/x-rar-compressed",
- rb = "text/x-script.ruby",
- rdf = "application/rdf+xml",
- roff = "text/troff",
- rpm = "application/x-redhat-package-manager",
- rss = "application/rss+xml",
- rtf = "application/rtf",
- ru = "text/x-script.ruby",
- s = "text/x-asm",
- sgm = "text/sgml",
- sgml = "text/sgml",
- sh = "application/x-sh",
- sig = "application/pgp-signature",
- snd = "audio/basic",
- so = "application/octet-stream",
- svg = "image/svg+xml",
- svgz = "image/svg+xml",
- swf = "application/x-shockwave-flash",
- t = "text/troff",
- tar = "application/x-tar",
- tbz = "application/x-bzip-compressed-tar",
- tci = "application/x-topcloud",
- tcl = "application/x-tcl",
- tex = "application/x-tex",
- texi = "application/x-texinfo",
- texinfo = "application/x-texinfo",
- text = "text/plain",
- tif = "image/tiff",
- tiff = "image/tiff",
- torrent = "application/x-bittorrent",
- tr = "text/troff",
- ttf = "application/x-font-ttf",
- txt = "text/plain",
- vcf = "text/x-vcard",
- vcs = "text/x-vcalendar",
- vrml = "model/vrml",
- war = "application/java-archive",
- wav = "audio/x-wav",
- webm = "video/webm",
- wma = "audio/x-ms-wma",
- wmv = "video/x-ms-wmv",
- wmx = "video/x-ms-wmx",
- wrl = "model/vrml",
- wsdl = "application/wsdl+xml",
- xbm = "image/x-xbitmap",
- xhtml = "application/xhtml+xml",
- xls = "application/vnd.ms-excel",
- xml = "application/xml",
- xpm = "image/x-xpixmap",
- xsl = "application/xml",
- xslt = "application/xslt+xml",
- yaml = "text/yaml",
- yml = "text/yaml",
- zip = "application/zip",
-}
-mime.table = table
-mime.default = "application/octet-stream"
-
-function mime.getType(path)
- return mime.table[path:lower():match("[^.]*$")] or mime.default
-end
-
-return mime
diff --git a/plugins/mime/plugin.json b/plugins/mime/plugin.json
deleted file mode 100644
index ee55fd559b3..00000000000
--- a/plugins/mime/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "mime",
- "version": "0.1.2-1",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/path/LICENSE b/plugins/path/LICENSE
deleted file mode 100644
index 8f71f43fee3..00000000000
--- a/plugins/path/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
diff --git a/plugins/path/README.md b/plugins/path/README.md
deleted file mode 100644
index 75d881e35e3..00000000000
--- a/plugins/path/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-path
-A luv port of luvi's path module
diff --git a/plugins/path/init.lua b/plugins/path/init.lua
deleted file mode 100644
index d0e427d02ee..00000000000
--- a/plugins/path/init.lua
+++ /dev/null
@@ -1,139 +0,0 @@
---[[
-
-Copyright 2014 The Luvit Authors. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS-IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
---]]
-
--- Extracted from https://github.com/luvit/luvi/blob/master/src/lua/init.lua
-
-local isWindows
-if jit and jit.os then
- -- Luajit provides explicit platform detection
- isWindows = jit.os == "Windows"
-else
- -- Normal lua will only have \ for path separator on windows.
- isWindows = package.config:find("\\") and true or false
-end
-
-local uv = require('luv')
-
-local getPrefix, splitPath, joinParts
-
-if isWindows then
- -- Windows aware path utilities
- function getPrefix(path)
- return path:match("^%a:\\") or
- path:match("^/") or
- path:match("^\\+")
- end
- function splitPath(path)
- local parts = {}
- for part in string.gmatch(path, '([^/\\]+)') do
- table.insert(parts, part)
- end
- return parts
- end
- function joinParts(prefix, parts, i, j)
- if not prefix then
- return table.concat(parts, '/', i, j)
- elseif prefix ~= '/' then
- return prefix .. table.concat(parts, '\\', i, j)
- else
- return prefix .. table.concat(parts, '/', i, j)
- end
- end
-else
- -- Simple optimized versions for UNIX systems
- function getPrefix(path)
- return path:match("^/")
- end
- function splitPath(path)
- local parts = {}
- for part in string.gmatch(path, '([^/]+)') do
- table.insert(parts, part)
- end
- return parts
- end
- function joinParts(prefix, parts, i, j)
- if prefix then
- return prefix .. table.concat(parts, '/', i, j)
- end
- return table.concat(parts, '/', i, j)
- end
-end
-
-local function pathJoin(...)
- local inputs = {...}
- local l = #inputs
-
- -- Find the last segment that is an absolute path
- -- Or if all are relative, prefix will be nil
- local i = l
- local prefix
- while true do
- prefix = getPrefix(inputs[i])
- if prefix or i <= 1 then break end
- i = i - 1
- end
-
- -- If there was one, remove its prefix from its segment
- if prefix then
- inputs[i] = inputs[i]:sub(#prefix)
- end
-
- -- Split all the paths segments into one large list
- local parts = {}
- while i <= l do
- local sub = splitPath(inputs[i])
- for j = 1, #sub do
- parts[#parts + 1] = sub[j]
- end
- i = i + 1
- end
-
- -- Evaluate special segments in reverse order.
- local skip = 0
- local reversed = {}
- for idx = #parts, 1, -1 do
- local part = parts[idx]
- if part == '.' then
- -- Ignore
- elseif part == '..' then
- skip = skip + 1
- elseif skip > 0 then
- skip = skip - 1
- else
- reversed[#reversed + 1] = part
- end
- end
-
- -- Reverse the list again to get the correct order
- parts = reversed
- for idx = 1, #parts / 2 do
- local j = #parts - idx + 1
- parts[idx], parts[j] = parts[j], parts[idx]
- end
-
- local path = joinParts(prefix, parts)
- return path
-end
-
-return {
- isWindows = isWindows,
- join = pathJoin,
- getPrefix = getPrefix,
- splitPath = splitPath,
- joinparts = joinParts,
-}
diff --git a/plugins/path/plugin.json b/plugins/path/plugin.json
deleted file mode 100644
index c88de67d77c..00000000000
--- a/plugins/path/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "path",
- "version": "1.0.0",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/pretty-print/LICENSE b/plugins/pretty-print/LICENSE
deleted file mode 100644
index 8f71f43fee3..00000000000
--- a/plugins/pretty-print/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
diff --git a/plugins/pretty-print/README.md b/plugins/pretty-print/README.md
deleted file mode 100644
index 82372160e09..00000000000
--- a/plugins/pretty-print/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-pretty-print
-luvit's pretty-print module re-packaged as a luv submodule.
diff --git a/plugins/pretty-print/init.lua b/plugins/pretty-print/init.lua
deleted file mode 100644
index f1c112d6e4f..00000000000
--- a/plugins/pretty-print/init.lua
+++ /dev/null
@@ -1,362 +0,0 @@
---[[
-
-Copyright 2014-2015 The Luvit Authors. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS-IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
---]]
-
--- Luv port by Tim Caswell <tim@creationix.com>
-
-local exports = {}
-exports.name = "luvit/pretty-print"
-exports.version = "1.0.3"
-exports.homepage = "https://github.com/luvit/luvit/blob/master/deps/pretty-print.lua"
-exports.description = "A lua value pretty printer and colorizer for terminals."
-exports.tags = {"colors", "tty"}
-exports.license = "Apache 2"
-exports.author = { name = "Tim Caswell" }
-
-local uv = require('luv')
-
-local prettyPrint, dump, strip, color, colorize, loadColors
-local theme = {}
-local useColors = false
-local defaultTheme
-
-local stdout, stdin, stderr, width
-
-local quote, quote2, dquote, dquote2, obracket, cbracket, obrace, cbrace, comma, equals, controls
-
-local themes = {
- -- nice color theme using 16 ansi colors
- [16] = {
- property = "0;37", -- white
- sep = "1;30", -- bright-black
- braces = "1;30", -- bright-black
-
- ["nil"] = "1;30", -- bright-black
- boolean = "0;33", -- yellow
- number = "1;33", -- bright-yellow
- string = "0;32", -- green
- quotes = "1;32", -- bright-green
- escape = "1;32", -- bright-green
- ["function"] = "0;35", -- purple
- thread = "1;35", -- bright-purple
-
- table = "1;34", -- bright blue
- userdata = "1;36", -- bright cyan
- cdata = "0;36", -- cyan
-
- err = "1;31", -- bright red
- success = "1;33;42", -- bright-yellow on green
- failure = "1;33;41", -- bright-yellow on red
- highlight = "1;36;44", -- bright-cyan on blue
- },
- -- nice color theme using ansi 256-mode colors
- [256] = {
- property = "38;5;253",
- braces = "38;5;247",
- sep = "38;5;240",
-
- ["nil"] = "38;5;244",
- boolean = "38;5;220", -- yellow-orange
- number = "38;5;202", -- orange
- string = "38;5;34", -- darker green
- quotes = "38;5;40", -- green
- escape = "38;5;46", -- bright green
- ["function"] = "38;5;129", -- purple
- thread = "38;5;199", -- pink
-
- table = "38;5;27", -- blue
- userdata = "38;5;39", -- blue2
- cdata = "38;5;69", -- teal
-
- err = "38;5;196", -- bright red
- success = "38;5;120;48;5;22", -- bright green on dark green
- failure = "38;5;215;48;5;52", -- bright red on dark red
- highlight = "38;5;45;48;5;236", -- bright teal on dark grey
- },
-}
-
-local special = {
- [7] = 'a',
- [8] = 'b',
- [9] = 't',
- [10] = 'n',
- [11] = 'v',
- [12] = 'f',
- [13] = 'r'
-}
-
-function strip(str)
- return string.gsub(str, '\027%[[^m]*m', '')
-end
-
-
-function loadColors(index)
- if index == nil then index = defaultTheme end
-
- -- Remove the old theme
- for key in pairs(theme) do
- theme[key] = nil
- end
-
- if index then
- local new = themes[index]
- if not new then error("Invalid theme index: " .. tostring(index)) end
- -- Add the new theme
- for key in pairs(new) do
- theme[key] = new[key]
- end
- useColors = true
- else
- useColors = false
- end
-
- quote = colorize('quotes', "'", 'string')
- quote2 = colorize('quotes', "'")
- dquote = colorize('quotes', '"', 'string')
- dquote2 = colorize('quotes', '"')
- obrace = colorize('braces', '{ ')
- cbrace = colorize('braces', '}')
- obracket = colorize('property', '[')
- cbracket = colorize('property', ']')
- comma = colorize('sep', ', ')
- equals = colorize('sep', ' = ')
-
- controls = {}
- for i = 0, 31 do
- local c = special[i]
- if not c then
- if i < 10 then
- c = "00" .. tostring(i)
- else
- c = "0" .. tostring(i)
- end
- end
- controls[i] = colorize('escape', '\\' .. c, 'string')
- end
- controls[92] = colorize('escape', '\\\\', 'string')
- controls[34] = colorize('escape', '\\"', 'string')
- controls[39] = colorize('escape', "\\'", 'string')
- for i = 128, 255 do
- local c
- if i < 100 then
- c = "0" .. tostring(i)
- else
- c = tostring(i)
- end
- controls[i] = colorize('escape', '\\' .. c, 'string')
- end
-
-end
-
-function color(colorName)
- return '\27[' .. (theme[colorName] or '0') .. 'm'
-end
-
-function colorize(colorName, string, resetName)
- return useColors and
- (color(colorName) .. tostring(string) .. color(resetName)) or
- tostring(string)
-end
-
-local function stringEscape(c)
- return controls[string.byte(c, 1)]
-end
-
-function dump(value, recurse, nocolor)
- local seen = {}
- local output = {}
- local offset = 0
- local stack = {}
-
- local function recalcOffset(index)
- for i = index + 1, #output do
- local m = string.match(output[i], "\n([^\n]*)$")
- if m then
- offset = #(strip(m))
- else
- offset = offset + #(strip(output[i]))
- end
- end
- end
-
- local function write(text, length)
- if not length then length = #(strip(text)) end
- -- Create room for data by opening parent blocks
- -- Start at the root and go down.
- local i = 1
- while offset + length > width and stack[i] do
- local entry = stack[i]
- if not entry.opened then
- entry.opened = true
- table.insert(output, entry.index + 1, "\n" .. string.rep(" ", i))
- -- Recalculate the offset
- recalcOffset(entry.index)
- -- Bump the index of all deeper entries
- for j = i + 1, #stack do
- stack[j].index = stack[j].index + 1
- end
- end
- i = i + 1
- end
- output[#output + 1] = text
- offset = offset + length
- if offset > width then
- return dump(stack)
- end
- end
-
- local function indent()
- stack[#stack + 1] = {
- index = #output,
- opened = false,
- }
- end
-
- local function unindent()
- stack[#stack] = nil
- end
-
- local function process(value)
- local typ = type(value)
- if typ == 'string' then
- if string.match(value, "'") and not string.match(value, '"') then
- write(dquote .. string.gsub(value, '[%c\\\128-\255]', stringEscape) .. dquote2)
- else
- write(quote .. string.gsub(value, "[%c\\'\128-\255]", stringEscape) .. quote2)
- end
- elseif typ == 'table' and not seen[value] then
- if not recurse then seen[value] = true end
- write(obrace)
- local i = 1
- -- Count the number of keys so we know when to stop adding commas
- local total = 0
- for _ in pairs(value) do total = total + 1 end
-
- local nextIndex = 1
- for k, v in pairs(value) do
- indent()
- if k == nextIndex then
- -- if the key matches the last numerical index + 1
- -- This is how lists print without keys
- nextIndex = k + 1
- process(v)
- else
- if type(k) == "string" and string.find(k,"^[%a_][%a%d_]*$") then
- write(colorize("property", k) .. equals)
- else
- write(obracket)
- process(k)
- write(cbracket .. equals)
- end
- if type(v) == "table" then
- process(v)
- else
- indent()
- process(v)
- unindent()
- end
- end
- if i < total then
- write(comma)
- else
- write(" ")
- end
- i = i + 1
- unindent()
- end
- write(cbrace)
- else
- write(colorize(typ, tostring(value)))
- end
- end
-
- process(value)
- local s = table.concat(output, "")
- return nocolor and strip(s) or s
-end
-
--- Print replacement that goes through libuv. This is useful on windows
--- to use libuv's code to translate ansi escape codes to windows API calls.
-function _G.print(...)
- local n = select('#', ...)
- local arguments = {...}
- for i = 1, n do
- arguments[i] = tostring(arguments[i])
- end
- uv.write(stdout, table.concat(arguments, "\t") .. "\n")
-end
-
-function prettyPrint(...)
- local n = select('#', ...)
- local arguments = { ... }
-
- for i = 1, n do
- arguments[i] = dump(arguments[i])
- end
-
- print(table.concat(arguments, "\t"))
-end
-
-function strip(str)
- return string.gsub(str, '\027%[[^m]*m', '')
-end
-
-if uv.guess_handle(0) == 'tty' then
- stdin = assert(uv.new_tty(0, true))
-else
- stdin = uv.new_pipe(false)
- uv.pipe_open(stdin, 0)
-end
-
-if uv.guess_handle(1) == 'tty' then
- stdout = assert(uv.new_tty(1, false))
- width = uv.tty_get_winsize(stdout)
- if width == 0 then width = 80 end
- -- auto-detect when 16 color mode should be used
- local term = os.getenv("TERM")
- if term == 'xterm' or term == 'xterm-256color' then
- defaultTheme = 256
- else
- defaultTheme = 16
- end
-else
- stdout = uv.new_pipe(false)
- uv.pipe_open(stdout, 1)
- width = 80
-end
-loadColors()
-
-if uv.guess_handle(2) == 'tty' then
- stderr = assert(uv.new_tty(2, false))
-else
- stderr = uv.new_pipe(false)
- uv.pipe_open(stderr, 2)
-end
-
-exports.loadColors = loadColors
-exports.theme = theme
-exports.print = print
-exports.prettyPrint = prettyPrint
-exports.dump = dump
-exports.color = color
-exports.colorize = colorize
-exports.stdin = stdin
-exports.stdout = stdout
-exports.stderr = stderr
-exports.strip = strip
-
-return exports
diff --git a/plugins/pretty-print/plugin.json b/plugins/pretty-print/plugin.json
deleted file mode 100644
index 556608c8dd6..00000000000
--- a/plugins/pretty-print/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "pretty-print",
- "version": "1.0.3",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/querystring/LICENSE b/plugins/querystring/LICENSE
deleted file mode 100644
index 8f71f43fee3..00000000000
--- a/plugins/querystring/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
diff --git a/plugins/querystring/README.md b/plugins/querystring/README.md
deleted file mode 100644
index 7f3437312bb..00000000000
--- a/plugins/querystring/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-querystring
-A luv port of luvit's querystring
diff --git a/plugins/querystring/init.lua b/plugins/querystring/init.lua
deleted file mode 100644
index 0e2675f9252..00000000000
--- a/plugins/querystring/init.lua
+++ /dev/null
@@ -1,105 +0,0 @@
---[[
-
-Copyright 2015 The Luvit Authors. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS-IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
---]]
-
-local exports = {}
-exports.name = "luvit/querystring"
-exports.version = "1.0.2"
-exports.license = "Apache 2"
-exports.homepage = "https://github.com/luvit/luvit/blob/master/deps/querystring.lua"
-exports.description = "Node-style query-string codec for luvit"
-exports.tags = {"luvit", "url", "codec"}
-
-local find = string.find
-local gsub = string.gsub
-local char = string.char
-local byte = string.byte
-local format = string.format
-local match = string.match
-local gmatch = string.gmatch
-
-function exports.urldecode(str)
- str = gsub(str, '+', ' ')
- str = gsub(str, '%%(%x%x)', function(h)
- return char(tonumber(h, 16))
- end)
- str = gsub(str, '\r\n', '\n')
- return str
-end
-
-function exports.urlencode(str)
- if str then
- str = gsub(str, '\n', '\r\n')
- str = gsub(str, '([^%w])', function(c)
- return format('%%%02X', byte(c))
- end)
- end
- return str
-end
-
-local function stringifyPrimitive(v)
- return tostring(v)
-end
-
-function exports.stringify(params, sep, eq)
- if not sep then sep = '&' end
- if not eq then eq = '=' end
- if type(params) == "table" then
- local fields = {}
- for key,value in pairs(params) do
- local keyString = exports.urlencode(stringifyPrimitive(key)) .. eq
- if type(value) == "table" then
- for _, v in ipairs(value) do
- table.insert(fields, keyString .. exports.urlencode(stringifyPrimitive(v)))
- end
- else
- table.insert(fields, keyString .. exports.urlencode(stringifyPrimitive(value)))
- end
- end
- return table.concat(fields, sep)
- end
- return ''
-end
-
--- parse querystring into table. urldecode tokens
-function exports.parse(str, sep, eq)
- if not sep then sep = '&' end
- if not eq then eq = '=' end
- local vars = {}
- for pair in gmatch(tostring(str), '[^' .. sep .. ']+') do
- if not find(pair, eq) then
- vars[exports.urldecode(pair)] = ''
- else
- local key, value = match(pair, '([^' .. eq .. ']*)' .. eq .. '(.*)')
- if key then
- key = exports.urldecode(key)
- value = exports.urldecode(value)
- local type = type(vars[key])
- if type=='nil' then
- vars[key] = value
- elseif type=='table' then
- table.insert(vars[key], value)
- else
- vars[key] = {vars[key],value}
- end
- end
- end
- end
- return vars
-end
-
-return exports
diff --git a/plugins/querystring/plugin.json b/plugins/querystring/plugin.json
deleted file mode 100644
index ddd3cc4291e..00000000000
--- a/plugins/querystring/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "querystring",
- "version": "1.0.2",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/weblit/LICENSE b/plugins/weblit/LICENSE
deleted file mode 100644
index 5789b767285..00000000000
--- a/plugins/weblit/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Tim Caswell
-
-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.
-
diff --git a/plugins/weblit/README.md b/plugins/weblit/README.md
deleted file mode 100644
index 55d6085d22b..00000000000
--- a/plugins/weblit/README.md
+++ /dev/null
@@ -1,239 +0,0 @@
-# weblit
-
-A web framework for luv (ported from luvit/lit)
-
-Weblit is a collection of lit packages that together form a nice web framework.
-
-## weblit/app
-
-This is the core of the framework. It's export value is the app itself. The
-config functions can be chained off this config for super terse syntax.
-
-```lua
-require('weblit/app')
-
- .bind({
- host = "0.0.0.0",
- port = 8080
- })
-
- .use(require('weblit/logger'))
- .use(require('weblit/auto-headers'))
- .use(require('weblit/etag-cache'))
-
- .route({
- method = "GET",
- path = "/do/:user/:action",
- domain = "*.myapp.io"
- }, function (req, res, go)
- -- Handle route
- end)
-
- .start()
-
-```
-
-### bind(options)
-
-Use this to configure your server. You can bind to multiple addresses and
-ports. For example, the same server can listen on port `8080` using normal HTTP
-while also listening on port `8443` using HTTPS.
-
-```lua
--- Listen on port 8080 internally using plain HTTP.
-.bind({
- host = "127.0.0.1",
- port = 8080
-})
-
--- Also listen on port 8443 externally using encrypted HTTPS.
-.bind({
- host = "0.0.0.0",
- port = 8443,
- tls = {
- cert = module:load("cert.pem"),
- key = module:load("key.pem",
- }
-})
-```
-
-The `host` option defaults to `"127.0.0.1"`. The default port depends on if
-you're running as root and if the connection is TLS encrypted.
-
- | Root | User
-------|-----:|------:
-HTTP | 80 | 8080
-HTTPS | 442 | 8443
-
-
-### use(middleware)
-
-This adds a raw middleware to the chain. It's signature is:
-
-```lua
-.use(function (req, res, go)
- -- Log the request table
- p("request", req)
- -- Hand off to the next layer.
- return go()
-end)
-```
-
-The `req` table will contain information about the HTTP request. This includes
-several fields:
-
- - `socket` - The raw libuv `uv_tty_t` socket.
- - `method` - The HTTP request method verb like `GET` or `POST`.
- - `path` - The raw HTTP request path (including query string).
- - `headers` - A list of headers. Each header is a table with two entries for
- key and value. For convenience, there are special `__index` and
- `__newindex` metamethods that let you treat this like a case insensitive
- key/value store.
- - `version` - The HTTP version (Usually either `1.0` or `1.1`).
- - `keepAlive` - A flag telling you if this should be a keepalive connection.
- - `body` - The request body as a string. In the future, this may also be a stream.
-
-The `res` table also has some conventions used to form the response a piece at a
-time. Initially it contains:
-
- - `code` - The response status code. Initially contains `404`.
- - `headers` - Another special headers table like in `req`.
- - `body` - The response body to send. Initially contains `"Not Found\n"`.
-
-The `go` function is to be called if you wish to not handle a request. This
-allows other middleware layers to get a chance to respond to the request. Use a
-tail call if there is nothing more to do.
-
-Otherwise do further processing after `go` returns. At this point, all inner
-layers have finished and a response is ready in `res`.
-
-### route(options, middleware)
-
-Route is like use, but allows you to pre-filter the requests before the middleware
-is called.
-
-```lua
-.route({
- method = "PUT",
- path = "/upload/:username"
-}, function (req, res, go)
- local url = saveFile(req.params.username, req.body)
- res.code = 201
- res.headers.Location = url
-end)
-```
-
-The route options accept several parameters:
-
- - `method` - This is a simple filter on a specific HTTP method verb.
- - `path` - This is either an exact match or can contain patterns. Segments
- looking like `:name` will match single path segments while `:name:` will
- match multiple segments. The matches will go into `req.params`. Also any
- query string will be stripped off, parsed out, and stored in `req.query`.
- - `host` - Will filter against the `Host` header. This can be an exact match
- or a glob match like `*.mydomain.org`.
- - `filter` - Filter is a custom lua function that accepts `req` and returns
- `true` or `false`.
-
-If the request matches all the requirements, then the middleware is called the
-same as with `use`.
-
-### start
-
-Bind to the port(s), listen on the socket(s) and start accepting connections.
-
-## weblit/logger
-
-This is a simple middleware that logs the request method, url and user agent.
-It also includes the response status code.
-
-Make sure to use it at the top of your middleware chain so that it's able to see
-the final response code sent to the client.
-
-```lua
-.use(require('weblit/logger'))
-```
-
-## weblit/auto-headers
-
-This implements lots of conventions and useful defaults that help your app
-implement a proper HTTP server.
-
-You should always use this near the top of the list. The only middleware that
-goes before this is the logger.
-
-
-```lua
-.use(require('weblit/auto-headers'))
-```
-
-## weblit/etag-cache
-
-This caches responses in memory keyed by etag. If there is no etag, but there
-is a response body, it will use the body to generate an etag.
-
-Put this in your list after auto-headers, but before custom server logic.
-
-```lua
-.use(require('weblit/etag-cache'))
-```
-
-## weblit/static
-
-This middleware serves static files to the user. Use this to serve your client-
-side web assets.
-
-Usage is pretty simplistic for now.
-
-```lua
-local static = require('weblit/static')
-app.use(static("path/to/static/assets"))
-```
-
-If you want to only match a sub-path, use the router.
-
-```lua
-app.route({
- path = "/blog/:path:"
-}, static(pathJoin(module.dir, "articles")))
-```
-
-The `path` param will be used if it exists and the full path will be used
-otherwise.
-
-## weblit/websocket
-
-This implements a websocket upgrade handler. You can choose the subprotocol and
-other routing information.
-
-```lua
-app.websocket({
- path = "/v2/socket", -- Prefix for matching
- protocol = "virgo/2.0", -- Restrict to a websocket sub-protocol
-}, function (req, read, write)
- -- Log the request headers
- p(req)
- -- Log and echo all messages
- for message in read do
- write(message)
- end
- -- End the stream
- write()
-end)
-```
-
-
-## weblit
-
-This is the metapackage that simply includes the other modules.
-
-It exposes the other modules as a single exports table.
-
-```lua
-exports.app = require('weblit/app')
-exports.autoHeaders = require('weblit/auto-headers')
-exports.etagCache = require('weblit/etag-cache')
-exports.logger = require('weblit/logger')
-exports.static = require('weblit/static')
-exports.websocket = require('weblit/websocket')
-```
diff --git a/plugins/weblit/app.lua b/plugins/weblit/app.lua
deleted file mode 100644
index d3839c1df8e..00000000000
--- a/plugins/weblit/app.lua
+++ /dev/null
@@ -1,261 +0,0 @@
-
-
-local createServer = require('coro-net').createServer
-local wrapper = require('coro-wrapper')
-local readWrap, writeWrap = wrapper.reader, wrapper.writer
-local httpCodec = require('http-codec')
---local tlsWrap = require('coro-tls').wrap
-local parseQuery = require('querystring').parse
-
--- Ignore SIGPIPE if it exists on platform
-local uv = require('luv')
-if uv.constants.SIGPIPE then
- uv.new_signal():start("sigpipe")
-end
-
-local server = {}
-local handlers = {}
-local bindings = {}
-
--- Provide a nice case insensitive interface to headers.
-local headerMeta = {
- __index = function (list, name)
- if type(name) ~= "string" then
- return rawget(list, name)
- end
- name = name:lower()
- for i = 1, #list do
- local key, value = unpack(list[i])
- if key:lower() == name then return value end
- end
- end,
- __newindex = function (list, name, value)
- -- non-string keys go through as-is.
- if type(name) ~= "string" then
- return rawset(list, name, value)
- end
- -- First remove any existing pairs with matching key
- local lowerName = name:lower()
- for i = #list, 1, -1 do
- if list[i][1]:lower() == lowerName then
- table.remove(list, i)
- end
- end
- -- If value is nil, we're done
- if value == nil then return end
- -- Otherwise, set the key(s)
- if (type(value) == "table") then
- -- We accept a table of strings
- for i = 1, #value do
- rawset(list, #list + 1, {name, tostring(value[i])})
- end
- else
- -- Or a single value interperted as string
- rawset(list, #list + 1, {name, tostring(value)})
- end
- end,
-}
-
-local function handleRequest(head, input, socket)
- local req = {
- socket = socket,
- method = head.method,
- path = head.path,
- headers = setmetatable({}, headerMeta),
- version = head.version,
- keepAlive = head.keepAlive,
- body = input
- }
- for i = 1, #head do
- req.headers[i] = head[i]
- end
-
- local res = {
- code = 404,
- headers = setmetatable({}, headerMeta),
- body = "Not Found\n",
- }
-
- local function run(i)
- local success, err = pcall(function ()
- i = i or 1
- local go = i < #handlers
- and function ()
- return run(i + 1)
- end
- or function () end
- return handlers[i](req, res, go)
- end)
- if not success then
- res.code = 500
- res.headers = setmetatable({}, headerMeta)
- res.body = err
- print(err)
- end
- end
- run(1)
-
- local out = {
- code = res.code,
- keepAlive = res.keepAlive,
- }
- for i = 1, #res.headers do
- out[i] = res.headers[i]
- end
- return out, res.body, res.upgrade
-end
-
-local function handleConnection(rawRead, rawWrite, socket)
-
- -- Speak in HTTP events
- local read, updateDecoder = readWrap(rawRead, httpCodec.decoder())
- local write, updateEncoder = writeWrap(rawWrite, httpCodec.encoder())
-
- for head in read do
- local parts = {}
- for chunk in read do
- if #chunk > 0 then
- parts[#parts + 1] = chunk
- else
- break
- end
- end
- local res, body, upgrade = handleRequest(head, #parts > 0 and table.concat(parts) or nil, socket)
- write(res)
- if upgrade then
- return upgrade(read, write, updateDecoder, updateEncoder, socket)
- end
- write(body)
- if not (res.keepAlive and head.keepAlive) then
- break
- end
- end
- write()
-
-end
-
-function server.bind(options)
- if not options.host then
- options.host = "127.0.0.1"
- end
- if not options.port then
- options.port = require('uv').getuid() == 0 and
- (options.tls and 443 or 80) or
- (options.tls and 8443 or 8080)
- end
- bindings[#bindings + 1] = options
- return server
-end
-
-function server.use(handler)
- handlers[#handlers + 1] = handler
- return server
-end
-
-
-function server.start()
- if #bindings == 0 then
- server.bind({})
- end
- for i = 1, #bindings do
- local options = bindings[i]
- createServer(options, function (rawRead, rawWrite, socket)
- --local tls = options.tls
- --if tls then
- --rawRead, rawWrite = tlsWrap(rawRead, rawWrite, {
- -- server = true,
- --key = assert(tls.key, "tls key required"),
- --cert = assert(tls.cert, "tls cert required"),
- --})
- --end
- return handleConnection(rawRead, rawWrite, socket)
- end)
- print("HTTP server listening at http" .. (options.tls and "s" or "") .. "://" .. options.host .. (options.port == (options.tls and 443 or 80) and "" or ":" .. options.port) .. "/")
- end
- return server
-end
-
-local quotepattern = '(['..("%^$().[]*+-?"):gsub("(.)", "%%%1")..'])'
-local function escape(str)
- return str:gsub(quotepattern, "%%%1")
-end
-
-local function compileGlob(glob)
- local parts = {"^"}
- for a, b in glob:gmatch("([^*]*)(%**)") do
- if #a > 0 then
- parts[#parts + 1] = escape(a)
- end
- if #b > 0 then
- parts[#parts + 1] = "(.*)"
- end
- end
- parts[#parts + 1] = "$"
- local pattern = table.concat(parts)
- return function (string)
- return string and string:match(pattern)
- end
-end
-
-local function compileRoute(route)
- local parts = {"^"}
- local names = {}
- for a, b, c, d in route:gmatch("([^:]*):([_%a][_%w]*)(:?)([^:]*)") do
- if #a > 0 then
- parts[#parts + 1] = escape(a)
- end
- if #c > 0 then
- parts[#parts + 1] = "(.*)"
- else
- parts[#parts + 1] = "([^/]*)"
- end
- names[#names + 1] = b
- if #d > 0 then
- parts[#parts + 1] = escape(d)
- end
- end
- if #parts == 1 then
- return function (string)
- if string == route then return {} end
- end
- end
- parts[#parts + 1] = "$"
- local pattern = table.concat(parts)
- return function (string)
- local matches = {string:match(pattern)}
- if #matches > 0 then
- local results = {}
- for i = 1, #matches do
- results[i] = matches[i]
- results[names[i]] = matches[i]
- end
- return results
- end
- end
-end
-
-function server.route(options, handler)
- local method = options.method
- local path = options.path and compileRoute(options.path)
- local host = options.host and compileGlob(options.host)
- local filter = options.filter
- server.use(function (req, res, go)
- if method and req.method ~= method then return go() end
- if host and not host(req.headers.host) then return go() end
- if filter and not filter(req) then return go() end
- local params
- if path then
- local pathname, query = req.path:match("^([^?]*)%??(.*)")
- params = path(pathname)
- if not params then return go() end
- if #query > 0 then
- req.query = parseQuery(query)
- end
- end
- req.params = params or {}
- return handler(req, res, go)
- end)
- return server
-end
-
-return server
diff --git a/plugins/weblit/auto-headers.lua b/plugins/weblit/auto-headers.lua
deleted file mode 100644
index 44ad65779e9..00000000000
--- a/plugins/weblit/auto-headers.lua
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
---[[
-
-Response automatic values:
- - Auto Server header
- - Auto Date Header
- - code defaults to 404 with body "Not Found\n"
- - if there is a string body add Content-Length and ETag if missing
- - if string body and no Content-Type, use text/plain for valid utf-8, application/octet-stream otherwise
- - Auto add "; charset=utf-8" to Content-Type when body is known to be valid utf-8
- - Auto 304 responses for if-none-match requests
- - Auto strip body with HEAD requests
- - Auto chunked encoding if body with unknown length
- - if Connection header set and not keep-alive, set res.keepAlive to false
- - Add Connection Keep-Alive/Close if not found based on res.keepAlive
-
---TODO: utf8 scanning
-
-]]
-
---local digest = require('openssl').digest.digest
-local date = require('os').date
-
-return function (req, res, go)
- local isHead = false
- if req.method == "HEAD" then
- req.method = "GET"
- isHead = true
- end
-
- local requested = req.headers["if-none-match"]
-
- go()
-
- -- We could use the fancy metatable, but this is much faster
- local lowerHeaders = {}
- local headers = res.headers
- for i = 1, #headers do
- local key, value = unpack(headers[i])
- lowerHeaders[key:lower()] = value
- end
-
-
- if not lowerHeaders.server then
- headers[#headers + 1] = {"Server", serverName}
- end
- if not lowerHeaders.date then
- headers[#headers + 1] = {"Date", date("!%a, %d %b %Y %H:%M:%S GMT")}
- end
-
- if not lowerHeaders.connection then
- if req.keepAlive then
- lowerHeaders.connection = "Keep-Alive"
- headers[#headers + 1] = {"Connection", "Keep-Alive"}
- else
- headers[#headers + 1] = {"Connection", "Close"}
- end
- end
- res.keepAlive = lowerHeaders.connection and lowerHeaders.connection:lower() == "keep-alive"
-
- local body = res.body
- if body then
- local needLength = not lowerHeaders["content-length"] and not lowerHeaders["transfer-encoding"]
- if type(body) == "string" then
- if needLength then
- headers[#headers + 1] = {"Content-Length", #body}
- end
- -- if not lowerHeaders.etag then
- -- local etag = '"' .. digest("sha1", body) .. '"'
- -- lowerHeaders.etag = etag
- --headers[#headers + 1] = {"ETag", etag}
- -- end
- else
- if needLength then
- headers[#headers + 1] = {"Transfer-Encoding", "chunked"}
- end
- end
- if not lowerHeaders["content-type"] then
- headers[#headers + 1] = {"Content-Type", "text/plain"}
- end
- end
-
- local etag = lowerHeaders.etag
- if requested and res.code >= 200 and res.code < 300 and requested == etag then
- res.code = 304
- body = nil
- end
-
- if isHead then body = nil end
- res.body = body
-end
diff --git a/plugins/weblit/etag-cache.lua b/plugins/weblit/etag-cache.lua
deleted file mode 100644
index e8c5d149b35..00000000000
--- a/plugins/weblit/etag-cache.lua
+++ /dev/null
@@ -1,39 +0,0 @@
-
-local function clone(headers)
- local copy = setmetatable({}, getmetatable(headers))
- for i = 1, #headers do
- copy[i] = headers[i]
- end
- return copy
-end
-
-local cache = {}
-return function (req, res, go)
- local requested = req.headers["If-None-Match"]
- local host = req.headers.Host
- local key = host and host .. "|" .. req.path or req.path
- local cached = cache[key]
- if not requested and cached then
- req.headers["If-None-Match"] = cached.etag
- end
- go()
- local etag = res.headers.ETag
- if not etag then return end
- if res.code >= 200 and res.code < 300 then
- local body = res.body
- if not body or type(body) == "string" then
- cache[key] = {
- etag = etag,
- code = res.code,
- headers = clone(res.headers),
- body = body
- }
- end
- elseif res.code == 304 then
- if not requested and cached and etag == cached.etag then
- res.code = cached.code
- res.headers = clone(cached.headers)
- res.body = cached.body
- end
- end
-end
diff --git a/plugins/weblit/init.lua b/plugins/weblit/init.lua
deleted file mode 100644
index f9224b7880c..00000000000
--- a/plugins/weblit/init.lua
+++ /dev/null
@@ -1,8 +0,0 @@
-local exports = {}
-exports.app = require('weblit/app')
-exports.autoHeaders = require('weblit/auto-headers')
-exports.etagCache = require('weblit/etag-cache')
-exports.logger = require('weblit/logger')
-exports.static = require('weblit/static')
-exports.websocket = require('weblit/websocket')
-return exports
diff --git a/plugins/weblit/logger.lua b/plugins/weblit/logger.lua
deleted file mode 100644
index 912b4eed768..00000000000
--- a/plugins/weblit/logger.lua
+++ /dev/null
@@ -1,10 +0,0 @@
-
-return function (req, res, go)
- -- Skip this layer for clients who don't send User-Agent headers.
- local userAgent = req.headers["user-agent"]
- if not userAgent then return go() end
- -- Run all inner layers first.
- go()
- -- And then log after everything is done
- --print(string.format("%s %s %s %s", req.method, req.path, userAgent, res.code))
-end
diff --git a/plugins/weblit/plugin.json b/plugins/weblit/plugin.json
deleted file mode 100644
index 69dd45ccc0e..00000000000
--- a/plugins/weblit/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "weblit",
- "version": "1.0.0",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/plugins/weblit/static.lua b/plugins/weblit/static.lua
deleted file mode 100644
index b34ea638fa1..00000000000
--- a/plugins/weblit/static.lua
+++ /dev/null
@@ -1,62 +0,0 @@
-
-local getType = require("mime").getType
-local jsonStringify = require('json').stringify
-
-local makeChroot = require('coro-fs').chroot
-
-return function (rootPath)
-
- local fs = makeChroot(rootPath)
-
- return function (req, res, go)
- if req.method ~= "GET" then return go() end
- local path = (req.params and req.params.path) or req.path
- path = path:match("^[^?#]*")
- if path:byte(1) == 47 then
- path = path:sub(2)
- end
- local stat = fs.stat(path)
- if not stat then return go() end
-
- local function renderFile()
- local body = assert(fs.readFile(path))
- res.code = 200
- res.headers["Content-Type"] = getType(path)
- res.body = body
- return
- end
-
- local function renderDirectory()
- if req.path:byte(-1) ~= 47 then
- res.code = 301
- res.headers.Location = req.path .. '/'
- return
- end
- local files = {}
- for entry in fs.scandir(path) do
- if entry.name == "index.html" and entry.type == "file" then
- path = (#path > 0 and path .. "/" or "") .. "index.html"
- return renderFile()
- end
- files[#files + 1] = entry
- entry.url = "http://" .. req.headers.host .. req.path .. entry.name
- end
- local body = jsonStringify(files) .. "\n"
- res.code = 200
- res.headers["Content-Type"] = "application/json"
- res.body = body
- return
- end
-
- if stat.type == "directory" then
- return renderDirectory()
- elseif stat.type == "file" then
- if req.path:byte(-1) == 47 then
- res.code = 301
- res.headers.Location = req.path:match("^(.*[^/])/+$")
- return
- end
- return renderFile()
- end
- end
-end
diff --git a/plugins/weblit/websocket.lua b/plugins/weblit/websocket.lua
deleted file mode 100644
index d5dfe572ea6..00000000000
--- a/plugins/weblit/websocket.lua
+++ /dev/null
@@ -1,82 +0,0 @@
-
-local websocketCodec = require('websocket-codec')
-
-local function websocketHandler(options, handler)
- return function (req, res, go)
- -- Websocket connections must be GET requests
- -- with 'Upgrade: websocket'
- -- and 'Connection: Upgrade' headers
- local headers = req.headers
- local connection = headers.connection
- local upgrade = headers.upgrade
- if not (
- req.method == "GET" and
- upgrade and upgrade:lower():find("websocket", 1, true) and
- connection and connection:lower():find("upgrade", 1, true)
- ) then
- return go()
- end
-
- if options.filter and not options.filter(req) then
- return go()
- end
-
- -- If there is a sub-protocol specified, filter on it.
- local protocol = options.protocol
- if protocol then
- local list = headers["sec-websocket-protocol"]
- local foundProtocol
- if list then
- for item in list:gmatch("[^, ]+") do
- if item == protocol then
- foundProtocol = true
- break
- end
- end
- end
- if not foundProtocol then
- return go()
- end
- end
-
- -- Make sure it's a new client speaking v13 of the protocol
- assert(tonumber(headers["sec-websocket-version"]) >= 13, "only websocket protocol v13 supported")
-
- -- Get the security key
- local key = assert(headers["sec-websocket-key"], "websocket security required")
-
- res.code = 101
- headers = res.headers
- headers.Upgrade = "websocket"
- headers.Connection = "Upgrade"
- headers["Sec-WebSocket-Accept"] = websocketCodec.acceptKey(key)
- if protocol then
- headers["Sec-WebSocket-Protocol"] = protocol
- end
- function res.upgrade(read, write, updateDecoder, updateEncoder)
- updateDecoder(websocketCodec.decode)
- updateEncoder(websocketCodec.encode)
- local success, err = pcall(handler, req, read, write)
- if not success then
- print(err)
- write({
- opcode = 1,
- payload = err,
- })
- return write()
- end
- end
- end
-end
-
-local server = require('weblit-app')
-function server.websocket(options, handler)
- server.route({
- method = "GET",
- path = options.path,
- host = options.host,
- }, websocketHandler(options, handler))
- return server
-end
-
-return websocketHandler
diff --git a/plugins/webserver/init.lua b/plugins/webserver/init.lua
deleted file mode 100644
index 3d68b01e6d5..00000000000
--- a/plugins/webserver/init.lua
+++ /dev/null
@@ -1,34 +0,0 @@
-local exports = {}
-exports.name = "webserver"
-exports.version = "1.0.0"
-exports.description = "A simple web server"
-exports.license = "MIT"
-exports.author = { name = "Miodrag Milanovic" }
-
-local ws = exports
-
-local app = require('weblit/app')
-
-function ws.startplugin()
- app.bind({
- host = "0.0.0.0",
- port = 8080
- })
-
- app.use(require('weblit/logger'))
- app.use(require('weblit/auto-headers'))
- app.use(require('weblit/etag-cache'))
-
- app.route({
- method = "GET",
- path = "/",
- }, function (req, res, go)
- res.code = 200
- res.headers["Content-Type"] = "text/html"
- res.body = "<h1>Hello!</h1>\n"
- end)
-
- app.start()
-end
-
-return exports
diff --git a/plugins/webserver/plugin.json b/plugins/webserver/plugin.json
deleted file mode 100644
index e420a5d5485..00000000000
--- a/plugins/webserver/plugin.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "plugin": {
- "name": "webserver",
- "version": "1.0.0",
- "author": "Miodrag Milanovic",
- "type": "plugin",
- "start": "false",
- }
-} \ No newline at end of file
diff --git a/plugins/websocket-codec/LICENSE b/plugins/websocket-codec/LICENSE
deleted file mode 100644
index 5789b767285..00000000000
--- a/plugins/websocket-codec/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Tim Caswell
-
-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.
-
diff --git a/plugins/websocket-codec/README.md b/plugins/websocket-codec/README.md
deleted file mode 100644
index 50f41340dce..00000000000
--- a/plugins/websocket-codec/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-websocket-codec
-A luv port of lit's websocket codec
diff --git a/plugins/websocket-codec/init.lua b/plugins/websocket-codec/init.lua
deleted file mode 100644
index 8a7da7f9190..00000000000
--- a/plugins/websocket-codec/init.lua
+++ /dev/null
@@ -1,261 +0,0 @@
-local exports = {}
-
-exports.name = "creationix/websocket-codec"
-exports.version = "1.0.7"
-exports.homepage = "https://github.com/luvit/lit/blob/master/deps/websocket-codec.lua"
-exports.description = "A codec implementing websocket framing and helpers for handshakeing"
-exports.tags = {"http", "websocket", "codec"}
-exports.license = "MIT"
-exports.author = { name = "Tim Caswell" }
-
-local digest = require('openssl').digest.digest
-local base64 = require('openssl').base64
-local random = require('openssl').random
-local bit = require('bit')
-
-local band = bit.band
-local bor = bit.bor
-local bxor = bit.bxor
-local rshift = bit.rshift
-local lshift = bit.lshift
-local char = string.char
-local byte = string.byte
-local sub = string.sub
-local gmatch = string.gmatch
-local lower = string.lower
-local gsub = string.gsub
-local concat = table.concat
-
-local function applyMask(data, mask)
- local bytes = {
- [0] = byte(mask, 1),
- [1] = byte(mask, 2),
- [2] = byte(mask, 3),
- [3] = byte(mask, 4)
- }
- local out = {}
- for i = 1, #data do
- out[i] = char(
- bxor(byte(data, i), bytes[(i - 1) % 4])
- )
- end
- return concat(out)
-end
-
-function exports.decode(chunk)
- if #chunk < 2 then return end
- local second = byte(chunk, 2)
- local len = band(second, 0x7f)
- local offset
- if len == 126 then
- if #chunk < 4 then return end
- len = bor(
- lshift(byte(chunk, 3), 8),
- byte(chunk, 4))
- offset = 4
- elseif len == 127 then
- if #chunk < 10 then return end
- len = bor(
- lshift(byte(chunk, 3), 56),
- lshift(byte(chunk, 4), 48),
- lshift(byte(chunk, 5), 40),
- lshift(byte(chunk, 6), 32),
- lshift(byte(chunk, 7), 24),
- lshift(byte(chunk, 8), 16),
- lshift(byte(chunk, 9), 8),
- byte(chunk, 10))
- offset = 10
- else
- offset = 2
- end
- local mask = band(second, 0x80) > 0
- if mask then
- offset = offset + 4
- end
- if #chunk < offset + len then return end
-
- local first = byte(chunk, 1)
- local payload = sub(chunk, offset + 1, offset + len)
- assert(#payload == len, "Length mismatch")
- if mask then
- payload = applyMask(payload, sub(chunk, offset - 3, offset))
- end
- local extra = sub(chunk, offset + len + 1)
- return {
- fin = band(first, 0x80) > 0,
- rsv1 = band(first, 0x40) > 0,
- rsv2 = band(first, 0x20) > 0,
- rsv3 = band(first, 0x10) > 0,
- opcode = band(first, 0xf),
- mask = mask,
- len = len,
- payload = payload
- }, extra
-end
-
-function exports.encode(item)
- if type(item) == "string" then
- item = {
- opcode = 2,
- payload = item
- }
- end
- local payload = item.payload
- assert(type(payload) == "string", "payload must be string")
- local len = #payload
- local fin = item.fin
- if fin == nil then fin = true end
- local rsv1 = item.rsv1
- local rsv2 = item.rsv2
- local rsv3 = item.rsv3
- local opcode = item.opcode or 2
- local mask = item.mask
- local chars = {
- char(bor(
- fin and 0x80 or 0,
- rsv1 and 0x40 or 0,
- rsv2 and 0x20 or 0,
- rsv3 and 0x10 or 0,
- opcode
- )),
- char(bor(
- mask and 0x80 or 0,
- len < 126 and len or (len < 0x10000) and 126 or 127
- ))
- }
- if len >= 0x10000 then
- chars[3] = char(band(rshift(len, 56), 0xff))
- chars[4] = char(band(rshift(len, 48), 0xff))
- chars[5] = char(band(rshift(len, 40), 0xff))
- chars[6] = char(band(rshift(len, 32), 0xff))
- chars[7] = char(band(rshift(len, 24), 0xff))
- chars[8] = char(band(rshift(len, 16), 0xff))
- chars[9] = char(band(rshift(len, 8), 0xff))
- chars[10] = char(band(len, 0xff))
- elseif len >= 126 then
- chars[3] = char(band(rshift(len, 8), 0xff))
- chars[4] = char(band(len, 0xff))
- end
- if mask then
- local key = random(4)
- return concat(chars) .. key .. applyMask(payload, key)
- end
- return concat(chars) .. payload
-end
-
-local websocketGuid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
-
-function exports.acceptKey(key)
- return gsub(base64(digest("sha1", key .. websocketGuid, true)), "\n", "")
-end
-local acceptKey = exports.acceptKey
-
--- Make a client handshake connection
-function exports.handshake(options, request)
- local key = gsub(base64(random(20)), "\n", "")
- local host = options.host
- local path = options.path or "/"
- local protocol = options.protocol
- local req = {
- method = "GET",
- path = path,
- {"Connection", "Upgrade"},
- {"Upgrade", "websocket"},
- {"Sec-WebSocket-Version", "13"},
- {"Sec-WebSocket-Key", key},
- }
- for i = 1, #options do
- req[#req + 1] = options[i]
- end
- if host then
- req[#req + 1] = {"Host", host}
- end
- if protocol then
- req[#req + 1] = {"Sec-WebSocket-Protocol", protocol}
- end
- local res = request(req)
- if not res then
- return nil, "Missing response from server"
- end
- -- Parse the headers for quick reading
- if res.code ~= 101 then
- return nil, "response must be code 101"
- end
-
- local headers = {}
- for i = 1, #res do
- local name, value = unpack(res[i])
- headers[lower(name)] = value
- end
-
- if not headers.connection or lower(headers.connection) ~= "upgrade" then
- return nil, "Invalid or missing connection upgrade header in response"
- end
- if headers["sec-websocket-accept"] ~= acceptKey(key) then
- return nil, "challenge key missing or mismatched"
- end
- if protocol and headers["sec-websocket-protocol"] ~= protocol then
- return nil, "protocol missing or mistmatched"
- end
- return true
-end
-
-function exports.handleHandshake(head, protocol)
-
- -- WebSocket connections must be GET requests
- if not head.method == "GET" then return end
-
- -- Parse the headers for quick reading
- local headers = {}
- for i = 1, #head do
- local name, value = unpack(head[i])
- headers[lower(name)] = value
- end
-
- -- Must have 'Upgrade: websocket' and 'Connection: Upgrade' headers
- if not (headers.connection and headers.upgrade and
- headers.connection:lower():find("upgrade", 1, true) and
- headers.upgrade:lower():find("websocket", 1, true)) then return end
-
- -- Make sure it's a new client speaking v13 of the protocol
- if tonumber(headers["sec-websocket-version"]) < 13 then
- return nil, "only websocket protocol v13 supported"
- end
-
- local key = headers["sec-websocket-key"]
- if not key then
- return nil, "websocket security key missing"
- end
-
- -- If the server wants a specified protocol, check for it.
- if protocol then
- local foundProtocol = false
- local list = headers["sec-websocket-protocol"]
- if list then
- for item in gmatch(list, "[^, ]+") do
- if item == protocol then
- foundProtocol = true
- break
- end
- end
- end
- if not foundProtocol then
- return nil, "specified protocol missing in request"
- end
- end
-
- local accept = acceptKey(key)
-
- local res = {
- code = 101,
- {"Upgrade", "websocket"},
- {"Connection", "Upgrade"},
- {"Sec-WebSocket-Accept", accept},
- }
- if protocol then
- res[#res + 1] = {"Sec-WebSocket-Protocol", protocol}
- end
-
- return res
-end
-return exports
diff --git a/plugins/websocket-codec/plugin.json b/plugins/websocket-codec/plugin.json
deleted file mode 100644
index 00a49dbcba3..00000000000
--- a/plugins/websocket-codec/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "websocket-codec",
- "version": "1.0.7",
- "author": "Tim Caswell",
- "type": "library",
- }
-} \ No newline at end of file
diff --git a/regtests/LICENSE b/regtests/LICENSE
new file mode 100644
index 00000000000..4d9210d10e1
--- /dev/null
+++ b/regtests/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2016, MAME Development Team
+All rights reserved.
+
+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 bsd3 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/regtests/README.md b/regtests/README.md
new file mode 100644
index 00000000000..c358bb20186
--- /dev/null
+++ b/regtests/README.md
@@ -0,0 +1,5 @@
+# **Regression tests** #
+
+Cointains code by various developers and it is used to test MAME tools
+
+Licensed under [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause)
diff --git a/samples/LICENSE b/samples/LICENSE
new file mode 100644
index 00000000000..670154e3538
--- /dev/null
+++ b/samples/LICENSE
@@ -0,0 +1,116 @@
+CC0 1.0 Universal
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific
+works ("Commons") that the public can reliably and without fear of later
+claims of infringement build upon, modify, incorporate in other works, reuse
+and redistribute as freely as possible in any form whatsoever and for any
+purposes, including without limitation commercial purposes. These owners may
+contribute to the Commons to promote the ideal of a free culture and the
+further production of creative, cultural and scientific works, or to gain
+reputation or greater distribution for their Work in part through the use and
+efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation
+of additional consideration or compensation, the person associating CC0 with a
+Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+and publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not limited
+to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
+ and translate a Work;
+
+ ii. moral rights retained by the original author(s) and/or performer(s);
+
+ iii. publicity and privacy rights pertaining to a person's image or likeness
+ depicted in a Work;
+
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+
+ v. rights protecting the extraction, dissemination, use and reuse of data in
+ a Work;
+
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation thereof,
+ including any amended or successor version of such directive); and
+
+ vii. other similar, equivalent or corresponding rights throughout the world
+ based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer's heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free,
+non transferable, non sublicensable, non exclusive, irrevocable and
+unconditional license to exercise Affirmer's Copyright and Related Rights in
+the Work (i) in all territories worldwide, (ii) for the maximum duration
+provided by applicable law or treaty (including future time extensions), (iii)
+in any current or future medium and for any number of copies, and (iv) for any
+purpose whatsoever, including without limitation commercial, advertising or
+promotional purposes (the "License"). The License shall be deemed effective as
+of the date CC0 was applied by Affirmer to the Work. Should any part of the
+License for any reason be judged legally invalid or ineffective under
+applicable law, such partial invalidity or ineffectiveness shall not
+invalidate the remainder of the License, and in such case Affirmer hereby
+affirms that he or she will not (i) exercise any of his or her remaining
+Copyright and Related Rights in the Work or (ii) assert any associated claims
+and causes of action with respect to the Work, in either case contrary to
+Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+
+ b. Affirmer offers the Work as-is and makes no representations or warranties
+ of any kind concerning the Work, express, implied, statutory or otherwise,
+ including without limitation warranties of title, merchantability, fitness
+ for a particular purpose, non infringement, or the absence of latent or
+ other defects, accuracy, or the present or absence of errors, whether or not
+ discoverable, all to the greatest extent permissible under applicable law.
+
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without limitation
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
+ disclaims responsibility for obtaining any necessary consents, permissions
+ or other rights required for any use of the Work.
+
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to this
+ CC0 or use of the Work.
+
+For more information, please see
+<http://creativecommons.org/publicdomain/zero/1.0/>
diff --git a/samples/README.md b/samples/README.md
new file mode 100644
index 00000000000..95f2526cee0
--- /dev/null
+++ b/samples/README.md
@@ -0,0 +1,5 @@
+# **Samples** #
+
+Samples are taken by team members or contributors to make mechanical sounds of various machines available in emulation.
+
+Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file
diff --git a/scripts/build/makelist.py b/scripts/build/makelist.py
index 329ff374520..cb6400b4d80 100644
--- a/scripts/build/makelist.py
+++ b/scripts/build/makelist.py
@@ -9,6 +9,8 @@ import sys
drivlist = []
sourcelist = []
+filter_addlist = []
+filter_removelist = []
def parse_file(srcfile):
try:
@@ -102,6 +104,12 @@ def parse_filter_file(srcfile):
sys.stderr.write("Importing drivers from '%s'\n" % sourcename[1:])
parse_filter_file(sourcename[1:])
continue
+ if sourcename[0]=='+':
+ filter_addlist.append(sourcename[1:])
+ continue
+ if sourcename[0]=='-':
+ filter_removelist.append(sourcename[1:])
+ continue
if not all(((c >='a' and c<='z') or (c>='0' and c<='9') or c=='_' or c=='.' or c=='-') for c in sourcename):
sys.stderr.write("%s:%d - Invalid character in driver \"%s\"\n" % (srcfile, linenum, sourcename))
return 1
@@ -128,6 +136,11 @@ if len(drivlist)==0 :
sys.stderr.write("No drivers found\n")
sys.exit(1)
+for x in filter_addlist:
+ drivlist.append(x)
+
+drivlist = [x for x in drivlist if (x not in filter_removelist)]
+
sys.stderr.write("%d driver(s) found\n" % len(drivlist))
# add a reference to the ___empty driver
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 82fb09947de..330a31221ee 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -511,64 +511,6 @@ project "lualibs"
}
--------------------------------------------------
--- luv lua library objects
---------------------------------------------------
-if _OPTIONS["USE_LIBUV"]=="1" then
-project "luv"
- uuid "d98ec5ca-da2a-4a50-88a2-52061ca53871"
- kind "StaticLib"
-
- if _OPTIONS["targetos"]=="windows" then
- defines {
- "_WIN32_WINNT=0x0600",
- }
- end
-
- configuration { "vs*" }
- buildoptions {
- "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
- }
-
- configuration { "gmake" }
- buildoptions_c {
- "-Wno-unused-function",
- "-Wno-strict-prototypes",
- "-Wno-unused-variable",
- "-Wno-undef",
- }
-
- configuration { "not android-*" }
- buildoptions_c {
- "-Wno-maybe-uninitialized",
- }
-
- configuration { "vs2015" }
- buildoptions {
- "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used
- "/wd4703", -- warning C4703: potentially uninitialized local pointer variable 'xxx' used
- }
-
- configuration { }
- defines {
- "LUA_COMPAT_ALL",
- }
-
- includedirs {
- MAME_DIR .. "3rdparty/lua/src",
- MAME_DIR .. "3rdparty/libuv/include",
- }
- if _OPTIONS["with-bundled-lua"] then
- includedirs {
- MAME_DIR .. "3rdparty/luv/deps/lua/src",
- }
- end
-
- files {
- MAME_DIR .. "3rdparty/luv/src/luv.c",
- MAME_DIR .. "3rdparty/luv/src/luv.h",
- }
-end
---------------------------------------------------
-- SQLite3 library objects
--------------------------------------------------
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index eafcc59f72e..daa73731b90 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -165,7 +165,6 @@ end
if _OPTIONS["USE_LIBUV"]=="1" then
links {
- "luv",
"uv",
"http-parser",
}
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
index 54443d4f618..1468ac6faca 100644
--- a/scripts/src/osd/modules.lua
+++ b/scripts/src/osd/modules.lua
@@ -445,9 +445,11 @@ if _OPTIONS["USE_XAUDIO2"]=="1" then
defines {
"USE_XAUDIO2=1",
},
- includedirs {
- MAME_DIR .. "3rdparty/win81sdk/Include/um",
- }
+ configuration { "mingw*"}
+ includedirs {
+ MAME_DIR .. "3rdparty/compat/mingw",
+ }
+ configuration { }
else
defines {
"USE_XAUDIO2=0",
diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua
index 50e19e8e71a..80360ac2ecb 100644
--- a/scripts/src/osd/windows.lua
+++ b/scripts/src/osd/windows.lua
@@ -217,6 +217,7 @@ project ("ocore_" .. _OPTIONS["osd"])
dofile("windows_cfg.lua")
includedirs {
+ MAME_DIR .. "3rdparty",
MAME_DIR .. "src/emu",
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib",
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index b84d17d69d5..9f17507c618 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -2590,8 +2590,6 @@ files {
MAME_DIR .. "src/mame/includes/tceptor.h",
MAME_DIR .. "src/mame/video/tceptor.cpp",
MAME_DIR .. "src/mame/drivers/toypop.cpp",
- MAME_DIR .. "src/mame/includes/toypop.h",
- MAME_DIR .. "src/mame/video/toypop.cpp",
MAME_DIR .. "src/mame/drivers/turrett.cpp",
MAME_DIR .. "src/mame/includes/turrett.h",
MAME_DIR .. "src/mame/audio/turrett.cpp",
@@ -2823,11 +2821,7 @@ files {
MAME_DIR .. "src/mame/includes/battlex.h",
MAME_DIR .. "src/mame/video/battlex.cpp",
MAME_DIR .. "src/mame/drivers/carjmbre.cpp",
- MAME_DIR .. "src/mame/includes/carjmbre.h",
- MAME_DIR .. "src/mame/video/carjmbre.cpp",
MAME_DIR .. "src/mame/drivers/popper.cpp",
- MAME_DIR .. "src/mame/includes/popper.h",
- MAME_DIR .. "src/mame/video/popper.cpp",
MAME_DIR .. "src/mame/drivers/spaceg.cpp",
}
@@ -4293,9 +4287,6 @@ files {
MAME_DIR .. "src/mame/drivers/fireball.cpp",
MAME_DIR .. "src/mame/drivers/flipjack.cpp",
MAME_DIR .. "src/mame/drivers/flower.cpp",
- MAME_DIR .. "src/mame/includes/flower.h",
- MAME_DIR .. "src/mame/audio/flower.cpp",
- MAME_DIR .. "src/mame/video/flower.cpp",
MAME_DIR .. "src/mame/drivers/fortecar.cpp",
MAME_DIR .. "src/mame/drivers/fresh.cpp",
MAME_DIR .. "src/mame/drivers/freekick.cpp",
@@ -4481,8 +4472,6 @@ files {
MAME_DIR .. "src/mame/drivers/splus.cpp",
MAME_DIR .. "src/mame/drivers/spool99.cpp",
MAME_DIR .. "src/mame/drivers/sprcros2.cpp",
- MAME_DIR .. "src/mame/includes/sprcros2.h",
- MAME_DIR .. "src/mame/video/sprcros2.cpp",
MAME_DIR .. "src/mame/drivers/sshot.cpp",
MAME_DIR .. "src/mame/drivers/ssingles.cpp",
MAME_DIR .. "src/mame/drivers/sstrangr.cpp",
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 6c0dd4b0894..ab2dd075fe5 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -1777,8 +1777,6 @@ files {
MAME_DIR .. "src/mame/drivers/mephisto.cpp",
MAME_DIR .. "src/mame/drivers/mmodular.cpp",
MAME_DIR .. "src/mame/drivers/stratos.cpp",
- MAME_DIR .. "src/mame/machine/mboard.cpp",
- MAME_DIR .. "src/mame/includes/mboard.h",
}
createMESSProjects(_target, _subtarget, "hitachi")
@@ -2605,8 +2603,6 @@ files {
createMESSProjects(_target, _subtarget, "svi")
files {
MAME_DIR .. "src/mame/drivers/svi318.cpp",
- MAME_DIR .. "src/mame/includes/svi318.h",
- MAME_DIR .. "src/mame/machine/svi318.cpp",
}
createMESSProjects(_target, _subtarget, "svision")
@@ -2996,9 +2992,6 @@ files {
MAME_DIR .. "src/mame/includes/mc1502.h",
MAME_DIR .. "src/mame/drivers/poisk1.cpp",
MAME_DIR .. "src/mame/machine/kb_poisk1.h",
- MAME_DIR .. "src/mame/includes/poisk1.h",
- MAME_DIR .. "src/mame/video/poisk1.cpp",
- MAME_DIR .. "src/mame/video/poisk1.h",
}
createMESSProjects(_target, _subtarget, "yamaha")
diff --git a/shaders/README.md b/shaders/README.md
new file mode 100644
index 00000000000..74a8c7d7834
--- /dev/null
+++ b/shaders/README.md
@@ -0,0 +1,3 @@
+# **Shares** #
+
+This folder is containing precompiled shaders to be used with BGFX, source files are available under their own license \ No newline at end of file
diff --git a/src/devices/bus/isa/isa_cards.cpp b/src/devices/bus/isa/isa_cards.cpp
index a9ab1b9dc8f..e2702a5598f 100644
--- a/src/devices/bus/isa/isa_cards.cpp
+++ b/src/devices/bus/isa/isa_cards.cpp
@@ -19,6 +19,7 @@ SLOT_INTERFACE_START( pc_isa8_cards )
SLOT_INTERFACE("aga_pc200", ISA8_AGA_PC200)
SLOT_INTERFACE("ega", ISA8_EGA)
SLOT_INTERFACE("pgc", ISA8_PGC)
+ SLOT_INTERFACE("vga", ISA8_VGA)
SLOT_INTERFACE("svga_et4k", ISA8_SVGA_ET4K)
SLOT_INTERFACE("num9rev",ISA8_NUM_9_REV)
SLOT_INTERFACE("com", ISA8_COM)
@@ -40,6 +41,7 @@ SLOT_INTERFACE_START( pc_isa8_cards )
SLOT_INTERFACE("sblaster1_0", ISA8_SOUND_BLASTER_1_0)
SLOT_INTERFACE("sblaster1_5", ISA8_SOUND_BLASTER_1_5)
SLOT_INTERFACE("stereo_fx", ISA8_STEREO_FX)
+ SLOT_INTERFACE("ssi2001", ISA8_SSI2001)
SLOT_INTERFACE("mpu401", ISA8_MPU401)
SLOT_INTERFACE("ne1000", NE1000)
SLOT_INTERFACE("3c503", EL2_3C503)
diff --git a/src/devices/cpu/arcompact/arcompact_make.py b/src/devices/cpu/arcompact/arcompact_make.py
index 080fd72b426..30aba810a99 100644
--- a/src/devices/cpu/arcompact/arcompact_make.py
+++ b/src/devices/cpu/arcompact/arcompact_make.py
@@ -1,5 +1,6 @@
#!/usr/bin/python
-
+# license:BSD-3-Clause
+# copyright-holders:David Haywood
from __future__ import print_function
import sys
diff --git a/src/devices/cpu/h8/h8.lst b/src/devices/cpu/h8/h8.lst
index 3ec1f46fbe4..56fcd25a548 100644
--- a/src/devices/cpu/h8/h8.lst
+++ b/src/devices/cpu/h8/h8.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
macro bxx_any %cond
prefetch_start();
TMP2 = read16i(TMP1);
diff --git a/src/devices/cpu/h8/h8make.py b/src/devices/cpu/h8/h8make.py
index 929b5d14c4e..2115bc01cbe 100644
--- a/src/devices/cpu/h8/h8make.py
+++ b/src/devices/cpu/h8/h8make.py
@@ -1,5 +1,6 @@
#!/usr/bin/python
-
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
from __future__ import print_function
USAGE = """
diff --git a/src/devices/cpu/m6502/ddeco16.lst b/src/devices/cpu/m6502/ddeco16.lst
index b57f2614cf0..9c84900e98b 100644
--- a/src/devices/cpu/m6502/ddeco16.lst
+++ b/src/devices/cpu/m6502/ddeco16.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# deco16 - deco variant
brk_16_imp ora_idx ill_non ill_non ill_non ora_zpg asl_zpg ill_non php_imp ora_imm asl_acc u0B_zpg ill_non ora_aba asl_aba ill_non
bpl_rel ora_idy ill_non u13_zpg ill_non ora_zpx asl_zpx ill_non clc_imp ora_aby ill_non ill_non ill_non ora_abx asl_abx ill_non
diff --git a/src/devices/cpu/m6502/dm4510.lst b/src/devices/cpu/m6502/dm4510.lst
index 6de7627ebc7..eae3c8ef006 100644
--- a/src/devices/cpu/m6502/dm4510.lst
+++ b/src/devices/cpu/m6502/dm4510.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# m4510 - 65ce02 with a mmu
brk_ce_imp ora_ce_idx cle_imp see_imp tsb_ce_zpg ora_ce_zpg asl_ce_zpg rmb_ce_bzp php_ce_imp ora_imm asl_ce_acc tsy_imp tsb_ce_aba ora_aba asl_ce_aba bbr_ce_zpb
bpl_ce_rel ora_ce_idy ora_idz bpl_rw2 trb_ce_zpg ora_ce_zpx asl_ce_zpx rmb_ce_bzp clc_ce_imp ora_ce_aby inc_ce_acc inz_imp trb_ce_aba ora_ce_abx asl_ce_abx bbr_ce_zpb
diff --git a/src/devices/cpu/m6502/dm6502.lst b/src/devices/cpu/m6502/dm6502.lst
index 335cae3d2e7..654a2f1fe74 100644
--- a/src/devices/cpu/m6502/dm6502.lst
+++ b/src/devices/cpu/m6502/dm6502.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# m6502_family_device - 6502, 6504
brk_imp ora_idx kil_non slo_idx nop_zpg ora_zpg asl_zpg slo_zpg php_imp ora_imm asl_acc anc_imm nop_aba ora_aba asl_aba slo_aba
bpl_rel ora_idy kil_non slo_idy nop_zpx ora_zpx asl_zpx slo_zpx clc_imp ora_aby nop_imp slo_aby nop_abx ora_abx asl_abx slo_abx
diff --git a/src/devices/cpu/m6502/dm6509.lst b/src/devices/cpu/m6502/dm6509.lst
index 644aa6c79d6..d8e498ecdf8 100644
--- a/src/devices/cpu/m6502/dm6509.lst
+++ b/src/devices/cpu/m6502/dm6509.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# m6509 - special banking on two specific instructions, and banking in general
brk_imp ora_idx kil_non slo_idx nop_zpg ora_zpg asl_zpg slo_zpg php_imp ora_imm asl_acc anc_imm nop_aba ora_aba asl_aba slo_aba
bpl_rel ora_idy kil_non slo_idy nop_zpx ora_zpx asl_zpx slo_zpx clc_imp ora_aby nop_imp slo_aby nop_abx ora_abx asl_abx slo_abx
diff --git a/src/devices/cpu/m6502/dm6510.lst b/src/devices/cpu/m6502/dm6510.lst
index dbc8bd88d57..18b78643795 100644
--- a/src/devices/cpu/m6502/dm6510.lst
+++ b/src/devices/cpu/m6502/dm6510.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# m6510_family - identical to 6502, except for some undocumented instructions that have to be handled specifically
brk_imp ora_idx kil_non slo_idx nop_zpg ora_zpg asl_zpg slo_zpg php_imp ora_imm asl_acc anc_10_imm nop_aba ora_aba asl_aba slo_aba
bpl_rel ora_idy kil_non slo_idy nop_zpx ora_zpx asl_zpx slo_zpx clc_imp ora_aby nop_imp slo_aby nop_abx ora_abx asl_abx slo_abx
diff --git a/src/devices/cpu/m6502/dm65c02.lst b/src/devices/cpu/m6502/dm65c02.lst
index 4b0cd1f2db4..a174a154041 100644
--- a/src/devices/cpu/m6502/dm65c02.lst
+++ b/src/devices/cpu/m6502/dm65c02.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# m65c02
brk_c_imp ora_idx nop_imm nop_c_imp tsb_zpg ora_zpg asl_zpg nop_c_imp php_imp ora_imm asl_acc nop_c_imp tsb_aba ora_aba asl_aba nop_c_imp
bpl_rel ora_idy ora_zpi nop_c_imp trb_zpg ora_zpx asl_zpx nop_c_imp clc_imp ora_aby inc_acc nop_c_imp trb_aba ora_abx asl_c_abx nop_c_imp
diff --git a/src/devices/cpu/m6502/dm65ce02.lst b/src/devices/cpu/m6502/dm65ce02.lst
index b2fafe67203..819ce35c614 100644
--- a/src/devices/cpu/m6502/dm65ce02.lst
+++ b/src/devices/cpu/m6502/dm65ce02.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# m65ce02 - Adds the B and Z registers to the r65c02, a bunch of instructions, and changes most of the timings
brk_ce_imp ora_ce_idx cle_imp see_imp tsb_ce_zpg ora_ce_zpg asl_ce_zpg rmb_ce_bzp php_ce_imp ora_imm asl_ce_acc tsy_imp tsb_ce_aba ora_aba asl_ce_aba bbr_ce_zpb
bpl_ce_rel ora_ce_idy ora_idz bpl_rw2 trb_ce_zpg ora_ce_zpx asl_ce_zpx rmb_ce_bzp clc_ce_imp ora_ce_aby inc_ce_acc inz_imp trb_ce_aba ora_ce_abx asl_ce_abx bbr_ce_zpb
diff --git a/src/devices/cpu/m6502/dm740.lst b/src/devices/cpu/m6502/dm740.lst
index c11f0826cd5..04f67738dc9 100644
--- a/src/devices/cpu/m6502/dm740.lst
+++ b/src/devices/cpu/m6502/dm740.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# m740 device
brk740_imp ora_idx kil_non bbs_bar nop_zpg ora_zpg asl_zpg bbs_bzr php_imp ora_imm asl_acc seb_bac nop_aba ora_aba asl_aba seb_biz
bpl_rel ora_idy clt_imp bbc_bar nop_zpx ora_zpx asl_zpx bbc_bzr clc_imp ora_aby dec_acc clb_bac nop_abx ora_abx asl_abx clb_biz
diff --git a/src/devices/cpu/m6502/dn2a03.lst b/src/devices/cpu/m6502/dn2a03.lst
index 7f0a5d4a9cb..06dcc2610a2 100644
--- a/src/devices/cpu/m6502/dn2a03.lst
+++ b/src/devices/cpu/m6502/dn2a03.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# n2a03 - D flag is disabled but present in the P register
brk_imp ora_idx kil_non slo_idx nop_zpg ora_zpg asl_zpg slo_zpg php_imp ora_imm asl_acc anc_imm nop_aba ora_aba asl_aba slo_aba
bpl_rel ora_idy kil_non slo_idy nop_zpx ora_zpx asl_zpx slo_zpx clc_imp ora_aby nop_imp slo_aby nop_abx ora_abx asl_abx slo_abx
diff --git a/src/devices/cpu/m6502/dr65c02.lst b/src/devices/cpu/m6502/dr65c02.lst
index fa4a97bda56..60573ac30d3 100644
--- a/src/devices/cpu/m6502/dr65c02.lst
+++ b/src/devices/cpu/m6502/dr65c02.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# r65c02 - rockwell variant, with the bitwise instructions and stp/wai
brk_c_imp ora_idx nop_imm nop_c_imp tsb_zpg ora_zpg asl_zpg rmb_bzp php_imp ora_imm asl_acc nop_c_imp tsb_aba ora_aba asl_aba bbr_zpb
bpl_rel ora_idy ora_zpi nop_c_imp trb_zpg ora_zpx asl_zpx rmb_bzp clc_imp ora_aby inc_acc nop_c_imp trb_aba ora_abx asl_c_abx bbr_zpb
diff --git a/src/devices/cpu/m6502/m6502make.py b/src/devices/cpu/m6502/m6502make.py
index 4ac62e90ce9..8bcd85f8e21 100755
--- a/src/devices/cpu/m6502/m6502make.py
+++ b/src/devices/cpu/m6502/m6502make.py
@@ -1,4 +1,6 @@
#!/usr/bin/python
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
from __future__ import print_function
diff --git a/src/devices/cpu/m6502/odeco16.lst b/src/devices/cpu/m6502/odeco16.lst
index 6cea2fa7282..f3aade96499 100644
--- a/src/devices/cpu/m6502/odeco16.lst
+++ b/src/devices/cpu/m6502/odeco16.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# deco 16 opcodes
brk_16_imp
// The 6502 bug when a nmi occurs in a brk is reproduced (case !irq_taken && nmi_state)
diff --git a/src/devices/cpu/m6502/om4510.lst b/src/devices/cpu/m6502/om4510.lst
index fbe49491fac..ade37a82db6 100644
--- a/src/devices/cpu/m6502/om4510.lst
+++ b/src/devices/cpu/m6502/om4510.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# 4510 opcodes
eom_imp
diff --git a/src/devices/cpu/m6502/om6502.lst b/src/devices/cpu/m6502/om6502.lst
index 24c560c02fa..93026a1fc8b 100644
--- a/src/devices/cpu/m6502/om6502.lst
+++ b/src/devices/cpu/m6502/om6502.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# NMOS 6502 opcodes
# Verified with visual6502
# documented opcodes
diff --git a/src/devices/cpu/m6502/om6509.lst b/src/devices/cpu/m6502/om6509.lst
index 4595827b1d7..8c9a6f9baa1 100644
--- a/src/devices/cpu/m6502/om6509.lst
+++ b/src/devices/cpu/m6502/om6509.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# 6509 opcodes
lda_9_idy
diff --git a/src/devices/cpu/m6502/om6510.lst b/src/devices/cpu/m6502/om6510.lst
index e08a5229111..1ad0dfc0182 100644
--- a/src/devices/cpu/m6502/om6510.lst
+++ b/src/devices/cpu/m6502/om6510.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# 6510 undocumented instructions in a C64 context
anc_10_imm
TMP2 = read_pc();
diff --git a/src/devices/cpu/m6502/om65c02.lst b/src/devices/cpu/m6502/om65c02.lst
index d64ddcdc409..c2536d2c11d 100644
--- a/src/devices/cpu/m6502/om65c02.lst
+++ b/src/devices/cpu/m6502/om65c02.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# m65c02 opcodes
adc_c_aba
diff --git a/src/devices/cpu/m6502/om65ce02.lst b/src/devices/cpu/m6502/om65ce02.lst
index 049097fded8..f5b6beebc9a 100644
--- a/src/devices/cpu/m6502/om65ce02.lst
+++ b/src/devices/cpu/m6502/om65ce02.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# 65ce02 opcodes, a lot only remove dummy read/write cycles, some are new, some use the B register
adc_ce_aba
diff --git a/src/devices/cpu/m6502/om740.lst b/src/devices/cpu/m6502/om740.lst
index 9f17dc639bf..f5ea32d49dc 100644
--- a/src/devices/cpu/m6502/om740.lst
+++ b/src/devices/cpu/m6502/om740.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# m740 opcodes
set_imp
read_pc_noinc();
diff --git a/src/devices/cpu/m6502/on2a03.lst b/src/devices/cpu/m6502/on2a03.lst
index 7d8a72c8d62..2719f7c6ad2 100644
--- a/src/devices/cpu/m6502/on2a03.lst
+++ b/src/devices/cpu/m6502/on2a03.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
# n2a03 opcodes - same as 6502 but with d disabled
adc_nd_aba
TMP = read_pc();
diff --git a/src/devices/cpu/m6800/6800ops.inc b/src/devices/cpu/m6800/6800ops.inc
index d6c3d7634a5..45a78d1d71f 100644
--- a/src/devices/cpu/m6800/6800ops.inc
+++ b/src/devices/cpu/m6800/6800ops.inc
@@ -1,4 +1,5 @@
-
+// license:BSD-3-Clause
+// copyright-holders:Aaron Giles
/*
HNZVC
diff --git a/src/devices/cpu/m6800/6800tbl.inc b/src/devices/cpu/m6800/6800tbl.inc
index 10515e54bdc..09c86bd8093 100644
--- a/src/devices/cpu/m6800/6800tbl.inc
+++ b/src/devices/cpu/m6800/6800tbl.inc
@@ -1,4 +1,5 @@
-
+// license:BSD-3-Clause
+// copyright-holders:Aaron Giles
const m6800_cpu_device::op_func m6800_cpu_device::m6800_insn[0x100] = {
&m6800_cpu_device::illegal,&m6800_cpu_device::nop, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::tap, &m6800_cpu_device::tpa,
&m6800_cpu_device::inx, &m6800_cpu_device::dex, &m6800_cpu_device::clv, &m6800_cpu_device::sev, &m6800_cpu_device::clc, &m6800_cpu_device::sec, &m6800_cpu_device::cli, &m6800_cpu_device::sei,
diff --git a/src/devices/cpu/m6805/6805ops.inc b/src/devices/cpu/m6805/6805ops.inc
index 713be5e0d7b..c6761982c96 100644
--- a/src/devices/cpu/m6805/6805ops.inc
+++ b/src/devices/cpu/m6805/6805ops.inc
@@ -1,4 +1,5 @@
-
+// license:BSD-3-Clause
+// copyright-holders:Aaron Giles
/*
HNZC
diff --git a/src/devices/cpu/m6809/base6x09.ops b/src/devices/cpu/m6809/base6x09.ops
index 334521eb385..54226cddfb9 100644
--- a/src/devices/cpu/m6809/base6x09.ops
+++ b/src/devices/cpu/m6809/base6x09.ops
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Nathan Woods
NMI:
m_nmi_asserted = false;
m_cc |= CC_E;
diff --git a/src/devices/cpu/m6809/hd6309.ops b/src/devices/cpu/m6809/hd6309.ops
index 6da3a904d2b..f96acfc695a 100644
--- a/src/devices/cpu/m6809/hd6309.ops
+++ b/src/devices/cpu/m6809/hd6309.ops
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Nathan Woods
MAIN:
// check interrupt lines
switch(get_pending_interrupt())
diff --git a/src/devices/cpu/m6809/konami.ops b/src/devices/cpu/m6809/konami.ops
index e2246f85b71..fefa27aea26 100644
--- a/src/devices/cpu/m6809/konami.ops
+++ b/src/devices/cpu/m6809/konami.ops
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Nathan Woods
MAIN:
// check interrupt lines
switch(get_pending_interrupt())
diff --git a/src/devices/cpu/m6809/m6809.ops b/src/devices/cpu/m6809/m6809.ops
index 96b9f6c11a7..5602211527a 100644
--- a/src/devices/cpu/m6809/m6809.ops
+++ b/src/devices/cpu/m6809/m6809.ops
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Nathan Woods
MAIN:
// check interrupt lines
switch(get_pending_interrupt())
diff --git a/src/devices/cpu/m6809/m6809make.py b/src/devices/cpu/m6809/m6809make.py
index c3d5b0f66ee..8838b960191 100644
--- a/src/devices/cpu/m6809/m6809make.py
+++ b/src/devices/cpu/m6809/m6809make.py
@@ -1,4 +1,6 @@
#!/usr/bin/python
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
import sys
import re
diff --git a/src/devices/cpu/mcs51/mcs51ops.inc b/src/devices/cpu/mcs51/mcs51ops.inc
index e60cc3505eb..0c1dec682ef 100644
--- a/src/devices/cpu/mcs51/mcs51ops.inc
+++ b/src/devices/cpu/mcs51/mcs51ops.inc
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Steve Ellenoff
/*******************************************************************************************
NOTE: All registers are accessed directly, instead of using the SFR_R() function for speed
Direct register access is availabe from the R_(register name) macros.. ex: ACC for the ACC
diff --git a/src/devices/cpu/mcs96/mcs96make.py b/src/devices/cpu/mcs96/mcs96make.py
index 72d8f36cfa6..b4844942e3d 100644
--- a/src/devices/cpu/mcs96/mcs96make.py
+++ b/src/devices/cpu/mcs96/mcs96make.py
@@ -1,4 +1,6 @@
#!/usr/bin/python
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
from __future__ import print_function
diff --git a/src/devices/cpu/mcs96/mcs96ops.lst b/src/devices/cpu/mcs96/mcs96ops.lst
index 7ccedf358da..372acb44218 100644
--- a/src/devices/cpu/mcs96/mcs96ops.lst
+++ b/src/devices/cpu/mcs96/mcs96ops.lst
@@ -1,3 +1,5 @@
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
fetch
if(irq_requested) {
int level;
diff --git a/src/devices/cpu/tms0980/tms0980.cpp b/src/devices/cpu/tms0980/tms0980.cpp
index e067946bb7a..3ea3ca918b1 100644
--- a/src/devices/cpu/tms0980/tms0980.cpp
+++ b/src/devices/cpu/tms0980/tms0980.cpp
@@ -203,7 +203,8 @@ const device_type TMS0270 = &device_creator<tms0270_cpu_device>; // 40-pin DIP,
// TMS0260 is same or similar?
// TP0320 is TI's first CMOS MCU with integrated LCD controller, the die is still very similar to TMS0980
-// - x
+// - ROM and main RAM is same as on TMS0980 with different row-select
+// -
const device_type TP0320 = &device_creator<tp0320_cpu_device>; // 28-pin SDIP, ..
diff --git a/src/devices/cpu/tms0980/tms0980d.cpp b/src/devices/cpu/tms0980/tms0980d.cpp
index ea72ba9be2e..371047b0a79 100644
--- a/src/devices/cpu/tms0980/tms0980d.cpp
+++ b/src/devices/cpu/tms0980/tms0980d.cpp
@@ -11,7 +11,8 @@
#include "tms0980.h"
-enum e_mnemonics {
+enum e_mnemonics
+{
zA10AAC=0, zA6AAC, zA8AAC, zAC1AC, zACACC, zACNAA, zALEC, zALEM, zAMAAC, zBRANCH, zCALL, zCCLA,
zCLA, zCLO, zCOMC, zCOMX, zCOMX8, zCPAIZ, zCTMDYN, zDAN, zDMAN, zDMEA, zDNAA,
zDYN, zIA, zIMAC, zIYC, zKNEZ, zLDP, zLDX, zLDX3, zLDX4, zMNEA, zMNEZ,
@@ -22,7 +23,8 @@ enum e_mnemonics {
zILL
};
-static const char *const s_mnemonic[] = {
+static const char *const s_mnemonic[] =
+{
"A10AAC", "A6AAC", "A8AAC", "AC1AC", "ACACC", "ACNAA", "ALEC", "ALEM", "AMAAC", "BRANCH", "CALL", "CCLA",
"CLA", "CLO", "COMC", "COMX", "COMX8", "CPAIZ", "CTMDYN", "DAN", "DMAN", "DMEA", "DNAA",
"DYN", "IA", "IMAC", "IYC", "KNEZ", "LDP", "LDX", "LDX", "LDX", "MNEA", "MNEZ",
@@ -37,7 +39,8 @@ static const char *const s_mnemonic[] = {
#define _OVER DASMFLAG_STEP_OVER
#define _OUT DASMFLAG_STEP_OUT
-static const UINT32 s_flags[] = {
+static const UINT32 s_flags[] =
+{
0, 0, 0, 0, 0, 0, 0, 0, 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,
@@ -49,11 +52,13 @@ static const UINT32 s_flags[] = {
};
-enum e_addressing {
+enum e_addressing
+{
zB0=0, zI2, zI3, zI4, zB7
};
-static const UINT8 s_addressing[] = {
+static const UINT8 s_addressing[] =
+{
zB0, zB0, zB0, zI4, zI4, zI4, zI4, zB0, zB0, zB7, zB7, zB0,
zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0,
zB0, zB0, zB0, zB0, zB0, zI4, zI2, zI3, zI4, zB0, zB0,
@@ -65,7 +70,25 @@ static const UINT8 s_addressing[] = {
};
-static const UINT8 tms0980_mnemonic[512] = {
+static const UINT8 tms0980_i2_value[4] =
+{
+ 0, 2, 1, 3
+};
+static const UINT8 tms0980_i3_value[8] =
+{
+ 0, 4, 2, 6, 1, 5, 3, 7
+};
+static const UINT8 tms0980_i4_value[16] =
+{
+ 0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe, 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf
+};
+
+
+
+// opcode luts
+
+static const UINT8 tms0980_mnemonic[512] =
+{
/* 0x000 */
zCOMX, zALEM, zYNEA, zXMA, zDYN, zIYC, zCLA, zDMAN,
zTKA, zMNEA, zTKM, zILL, zILL, zSETR, zKNEZ, zILL,
@@ -151,7 +174,8 @@ static const UINT8 tms0980_mnemonic[512] = {
};
-static const UINT8 tms1000_mnemonic[256] = {
+static const UINT8 tms1000_mnemonic[256] =
+{
/* 0x00 */
zCOMX, zA8AAC, zYNEA, zTAM, zTAMZA, zA10AAC, zA6AAC, zDAN,
zTKA, zKNEZ, zTDO, zCLO, zRSTR, zSETR, zIA, zRETN,
@@ -191,7 +215,8 @@ static const UINT8 tms1000_mnemonic[256] = {
};
-static const UINT8 tms1100_mnemonic[256] = {
+static const UINT8 tms1100_mnemonic[256] =
+{
/* 0x00 */
zMNEA, zALEM, zYNEA, zXMA, zDYN, zIYC, zAMAAC, zDMAN,
zTKA, zCOMX, zTDO, zCOMC, zRSTR, zSETR, zKNEZ, zRETN,
@@ -233,21 +258,11 @@ static const UINT8 tms1100_mnemonic[256] = {
};
-static const UINT8 tms0980_i2_value[4] =
-{
- 0x00, 0x02, 0x01, 0x03
-};
-static const UINT8 tms0980_i3_value[8] =
-{
- 0x00, 0x04, 0x02, 0x06, 0x01, 0x05, 0x03, 0x07
-};
-static const UINT8 tms0980_i4_value[16] =
-{
- 0x00, 0x08, 0x04, 0x0C, 0x02, 0x0A, 0x06, 0x0E, 0x01, 0x09, 0x05, 0x0D, 0x03, 0x0B, 0x07, 0x0F
-};
+// disasm
-CPU_DISASSEMBLE( tms0980 ) {
+CPU_DISASSEMBLE( tms0980 )
+{
char *dst = buffer;
UINT16 op, instr;
int pos = 0;
@@ -259,7 +274,8 @@ CPU_DISASSEMBLE( tms0980 ) {
dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
- switch( s_addressing[instr] ) {
+ switch( s_addressing[instr] )
+ {
default:
case zB0:
break;
@@ -278,7 +294,8 @@ CPU_DISASSEMBLE( tms0980 ) {
}
-CPU_DISASSEMBLE( tms1000 ) {
+CPU_DISASSEMBLE( tms1000 )
+{
char *dst = buffer;
UINT8 op, instr;
int pos = 0;
@@ -290,7 +307,8 @@ CPU_DISASSEMBLE( tms1000 ) {
dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
- switch( s_addressing[instr] ) {
+ switch( s_addressing[instr] )
+ {
default:
case zB0:
break;
@@ -309,7 +327,8 @@ CPU_DISASSEMBLE( tms1000 ) {
}
-CPU_DISASSEMBLE( tms1100 ) {
+CPU_DISASSEMBLE( tms1100 )
+{
char *dst = buffer;
UINT8 op, instr;
int pos = 0;
@@ -321,7 +340,8 @@ CPU_DISASSEMBLE( tms1100 ) {
dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
- switch( s_addressing[instr] ) {
+ switch( s_addressing[instr] )
+ {
default:
case zB0:
break;
diff --git a/src/devices/cpu/tms57002/tmsmake.py b/src/devices/cpu/tms57002/tmsmake.py
index df37f261dc1..e2e12b5a4b3 100755
--- a/src/devices/cpu/tms57002/tmsmake.py
+++ b/src/devices/cpu/tms57002/tmsmake.py
@@ -1,4 +1,6 @@
#!/usr/bin/python
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert
from __future__ import print_function
diff --git a/src/devices/machine/ram.cpp b/src/devices/machine/ram.cpp
index c190ea64f16..66e8b31cf4f 100644
--- a/src/devices/machine/ram.cpp
+++ b/src/devices/machine/ram.cpp
@@ -1,4 +1,4 @@
-// license: BSD-3-Clause
+// license:BSD-3-Clause
// copyright-holders: Dirk Best
/*************************************************************************
diff --git a/src/devices/machine/ram.h b/src/devices/machine/ram.h
index 5140309f825..8fbe85cd865 100644
--- a/src/devices/machine/ram.h
+++ b/src/devices/machine/ram.h
@@ -1,4 +1,4 @@
-// license: BSD-3-Clause
+// license:BSD-3-Clause
// copyright-holders: Dirk Best
/*************************************************************************
diff --git a/src/devices/machine/s3c24xx.inc b/src/devices/machine/s3c24xx.inc
index e2c4800f077..ca7bc05a90d 100644
--- a/src/devices/machine/s3c24xx.inc
+++ b/src/devices/machine/s3c24xx.inc
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Tim Schuerewegen
/*******************************************************************************
Samsung S3C2400 / S3C2410 / S3C2440
diff --git a/src/devices/sound/315-5641.cpp b/src/devices/sound/315-5641.cpp
index df5341c7382..dbec291779f 100644
--- a/src/devices/sound/315-5641.cpp
+++ b/src/devices/sound/315-5641.cpp
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Angelo Salese
/* Sega 315-5641 / D77591 / 9442CA010 */
#include "emu.h"
diff --git a/src/devices/sound/315-5641.h b/src/devices/sound/315-5641.h
index 49e068fb4ac..e8349236421 100644
--- a/src/devices/sound/315-5641.h
+++ b/src/devices/sound/315-5641.h
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Angelo Salese
/* Sega 315-5641 / D77591 / 9442CA010 */
// this is the PICO sound chip, we are not sure if it's the same as a 7759 or not, it requires FIFO logic
diff --git a/src/devices/video/epic12in.inc b/src/devices/video/epic12in.inc
index cf0c81dd80f..4297c5a2d55 100644
--- a/src/devices/video/epic12in.inc
+++ b/src/devices/video/epic12in.inc
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
/* blitter function */
void epic12_device::FUNCNAME(BLIT_PARAMS)
diff --git a/src/devices/video/epic12pixel.inc b/src/devices/video/epic12pixel.inc
index 3cb01cebbf4..65666470e40 100644
--- a/src/devices/video/epic12pixel.inc
+++ b/src/devices/video/epic12pixel.inc
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
/* This is the inner-most loop code (per-pixel) and thus the most performance sensitive part */
#if FLIPX == 1
diff --git a/src/devices/video/voodoo_rast.inc b/src/devices/video/voodoo_rast.inc
index e7251bf9a01..4c858bc1e69 100644
--- a/src/devices/video/voodoo_rast.inc
+++ b/src/devices/video/voodoo_rast.inc
@@ -1,4 +1,5 @@
-
+// license:BSD-3-Clause
+// copyright-holders:Aaron Giles
/***************************************************************************
GAME-SPECIFIC RASTERIZERS
***************************************************************************/
diff --git a/src/emu/layout/LICENSE b/src/emu/layout/LICENSE
new file mode 100644
index 00000000000..670154e3538
--- /dev/null
+++ b/src/emu/layout/LICENSE
@@ -0,0 +1,116 @@
+CC0 1.0 Universal
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific
+works ("Commons") that the public can reliably and without fear of later
+claims of infringement build upon, modify, incorporate in other works, reuse
+and redistribute as freely as possible in any form whatsoever and for any
+purposes, including without limitation commercial purposes. These owners may
+contribute to the Commons to promote the ideal of a free culture and the
+further production of creative, cultural and scientific works, or to gain
+reputation or greater distribution for their Work in part through the use and
+efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation
+of additional consideration or compensation, the person associating CC0 with a
+Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+and publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not limited
+to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
+ and translate a Work;
+
+ ii. moral rights retained by the original author(s) and/or performer(s);
+
+ iii. publicity and privacy rights pertaining to a person's image or likeness
+ depicted in a Work;
+
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+
+ v. rights protecting the extraction, dissemination, use and reuse of data in
+ a Work;
+
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation thereof,
+ including any amended or successor version of such directive); and
+
+ vii. other similar, equivalent or corresponding rights throughout the world
+ based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer's heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free,
+non transferable, non sublicensable, non exclusive, irrevocable and
+unconditional license to exercise Affirmer's Copyright and Related Rights in
+the Work (i) in all territories worldwide, (ii) for the maximum duration
+provided by applicable law or treaty (including future time extensions), (iii)
+in any current or future medium and for any number of copies, and (iv) for any
+purpose whatsoever, including without limitation commercial, advertising or
+promotional purposes (the "License"). The License shall be deemed effective as
+of the date CC0 was applied by Affirmer to the Work. Should any part of the
+License for any reason be judged legally invalid or ineffective under
+applicable law, such partial invalidity or ineffectiveness shall not
+invalidate the remainder of the License, and in such case Affirmer hereby
+affirms that he or she will not (i) exercise any of his or her remaining
+Copyright and Related Rights in the Work or (ii) assert any associated claims
+and causes of action with respect to the Work, in either case contrary to
+Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+
+ b. Affirmer offers the Work as-is and makes no representations or warranties
+ of any kind concerning the Work, express, implied, statutory or otherwise,
+ including without limitation warranties of title, merchantability, fitness
+ for a particular purpose, non infringement, or the absence of latent or
+ other defects, accuracy, or the present or absence of errors, whether or not
+ discoverable, all to the greatest extent permissible under applicable law.
+
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without limitation
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
+ disclaims responsibility for obtaining any necessary consents, permissions
+ or other rights required for any use of the Work.
+
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to this
+ CC0 or use of the Work.
+
+For more information, please see
+<http://creativecommons.org/publicdomain/zero/1.0/>
diff --git a/src/emu/layout/README.md b/src/emu/layout/README.md
new file mode 100644
index 00000000000..78ef2e5e6ad
--- /dev/null
+++ b/src/emu/layout/README.md
@@ -0,0 +1,6 @@
+# **Layout** #
+
+Layouts files are definiton files to describe look and fell of emulated machines, and are product
+of many different contributors.
+
+Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file
diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp
index ecf1b418de5..d35a10d9167 100644
--- a/src/emu/luaengine.cpp
+++ b/src/emu/luaengine.cpp
@@ -19,9 +19,6 @@
#include "ui/ui.h"
#include "luaengine.h"
#include <mutex>
-#if !defined(NO_LIBUV)
-#include "libuv/include/uv.h"
-#endif
//**************************************************************************
// LUA ENGINE
@@ -52,10 +49,6 @@ extern "C" {
int luaopen_lsqlite3(lua_State *L);
int luaopen_zlib(lua_State *L);
int luaopen_lfs(lua_State *L);
-#if !defined(NO_LIBUV)
- int luaopen_luv(lua_State *L);
- uv_loop_t* luv_loop(lua_State* L);
-#endif
}
static void lstop(lua_State *L, lua_Debug *ar)
@@ -1199,12 +1192,6 @@ lua_engine::lua_engine()
lua_getfield(m_lua_state, -1, "preload");
lua_remove(m_lua_state, -2); // Remove package
-#if !defined(NO_LIBUV)
- // Store uv module definition at preload.uv
- lua_pushcfunction(m_lua_state, luaopen_luv);
- lua_setfield(m_lua_state, -2, "luv");
-#endif
-
lua_pushcfunction(m_lua_state, luaopen_zlib);
lua_setfield(m_lua_state, -2, "zlib");
@@ -1670,11 +1657,6 @@ void lua_engine::periodic_check()
msg.ready = 0;
msg.done = 1;
}
-#if !defined(NO_LIBUV)
- auto loop = luv_loop(m_lua_state);
- if (loop!=nullptr)
- uv_run(loop, UV_RUN_NOWAIT);
-#endif
}
//-------------------------------------------------
diff --git a/src/emu/mame.cpp b/src/emu/mame.cpp
index 513300553d6..5e93623498d 100644
--- a/src/emu/mame.cpp
+++ b/src/emu/mame.cpp
@@ -259,7 +259,7 @@ int machine_manager::execute()
sw_instance = sw_load.substr(right + 1);
sw_load.assign(sw_load.substr(0, right));
- char arg[] = "ume";
+ char arg[] = "mame";
char *argv = &arg[0];
m_options.set_value(OPTION_SOFTWARENAME, sw_name.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
m_options.parse_slot_devices(1, &argv, option_errors, sw_instance.c_str(), sw_load.c_str());
diff --git a/src/emu/ui/custui.cpp b/src/emu/ui/custui.cpp
index 6aaed9105df..1acecd1ba20 100644
--- a/src/emu/ui/custui.cpp
+++ b/src/emu/ui/custui.cpp
@@ -857,7 +857,7 @@ void ui_menu_rgb_ui::populate()
if (m_lock_ref != RGB_ALPHA)
{
arrow_flags = get_arrow_flags(0, 255, m_color->a());
- item_append(_("Alpha"), string_format("%3d", m_color->a()).c_str(), arrow_flags, (void *)(FPTR)RGB_ALPHA);
+ item_append(_("Alpha"), string_format("%3u", m_color->a()).c_str(), arrow_flags, (void *)(FPTR)RGB_ALPHA);
}
else
item_append(_("Alpha"), s_text.c_str(), 0, (void *)(FPTR)RGB_ALPHA);
@@ -865,7 +865,7 @@ void ui_menu_rgb_ui::populate()
if (m_lock_ref != RGB_RED)
{
arrow_flags = get_arrow_flags(0, 255, m_color->r());
- item_append(_("Red"), string_format("%3d", m_color->r()).c_str(), arrow_flags, (void *)(FPTR)RGB_RED);
+ item_append(_("Red"), string_format("%3u", m_color->r()).c_str(), arrow_flags, (void *)(FPTR)RGB_RED);
}
else
item_append(_("Red"), s_text.c_str(), 0, (void *)(FPTR)RGB_RED);
@@ -873,7 +873,7 @@ void ui_menu_rgb_ui::populate()
if (m_lock_ref != RGB_GREEN)
{
arrow_flags = get_arrow_flags(0, 255, m_color->g());
- item_append(_("Green"), string_format("%3d", m_color->g()).c_str(), arrow_flags, (void *)(FPTR)RGB_GREEN);
+ item_append(_("Green"), string_format("%3u", m_color->g()).c_str(), arrow_flags, (void *)(FPTR)RGB_GREEN);
}
else
item_append(_("Green"), s_text.c_str(), 0, (void *)(FPTR)RGB_GREEN);
@@ -881,7 +881,7 @@ void ui_menu_rgb_ui::populate()
if (m_lock_ref != RGB_BLUE)
{
arrow_flags = get_arrow_flags(0, 255, m_color->b());
- item_append(_("Blue"), string_format("%3d", m_color->b()).c_str(), arrow_flags, (void *)(FPTR)RGB_BLUE);
+ item_append(_("Blue"), string_format("%3u", m_color->b()).c_str(), arrow_flags, (void *)(FPTR)RGB_BLUE);
}
else
item_append(_("Blue"), s_text.c_str(), 0, (void *)(FPTR)RGB_BLUE);
diff --git a/src/emu/ui/dirmenu.cpp b/src/emu/ui/dirmenu.cpp
index a24a0041653..8ae0372af30 100644
--- a/src/emu/ui/dirmenu.cpp
+++ b/src/emu/ui/dirmenu.cpp
@@ -180,7 +180,7 @@ void ui_menu_display_actual::handle()
void ui_menu_display_actual::populate()
{
- m_tempbuf.assign(_("Current ")).append(_(s_folders[m_ref].name)).append(_(" Folders"));
+ m_tempbuf = string_format(_("Current %1$s Folders"), _(s_folders[m_ref].name));
if (machine().ui().options().exists(s_folders[m_ref].option))
m_searchpath.assign(machine().ui().options().value(s_folders[m_ref].option));
else
@@ -494,8 +494,12 @@ void ui_menu_add_change_folder::custom_render(void *selectedref, float top, floa
float width, maxwidth = origx2 - origx1;
ui_manager &mui = machine().ui();
std::string tempbuf[2];
- tempbuf[0] = (m_change) ? _("Change)") : _("Add");
- tempbuf[0].append(" ").append(_(s_folders[m_ref].name)).append(_(" Folder - Search: ")).append(m_search).append("_");
+ tempbuf[0] = string_format(
+ (m_change)
+ ? _("Change %1$s Folder - Search: %2$s_")
+ : _("Add %1$s Folder - Search: %2$s_"),
+ _(s_folders[m_ref].name),
+ m_search);
tempbuf[1] = m_current_path;
// get the size of the text
@@ -636,7 +640,7 @@ void ui_menu_remove_folder::custom_render(void *selectedref, float top, float bo
{
float width;
ui_manager &mui = machine().ui();
- std::string tempbuf = std::string(_("Remove ")).append(_(s_folders[m_ref].name)).append(_(" Folder"));
+ std::string tempbuf = string_format(_("Remove %1$s Folder"), _(s_folders[m_ref].name));
// get the size of the text
mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp
index 56c41062afd..ccc73f55002 100644
--- a/src/emu/ui/menu.cpp
+++ b/src/emu/ui/menu.cpp
@@ -1891,6 +1891,21 @@ void ui_menu::handle_main_events(UINT32 flags)
bool stop = false;
ui_event local_menu_event;
+ if (m_pressed)
+ {
+ bool pressed = mouse_pressed();
+ INT32 m_target_x, m_target_y;
+ bool m_button;
+ render_target *mouse_target = machine().ui_input().find_mouse(&m_target_x, &m_target_y, &m_button);
+ if (mouse_target != nullptr && m_button && (hover == HOVER_ARROW_DOWN || hover == HOVER_ARROW_UP))
+ {
+ if (pressed)
+ machine().ui_input().push_mouse_down_event(mouse_target, m_target_x, m_target_y);
+ }
+ else
+ reset_pressed();
+ }
+
// loop while we have interesting events
while (!stop && machine().ui_input().pop_event(&local_menu_event))
{
@@ -1919,6 +1934,7 @@ void ui_menu::handle_main_events(UINT32 flags)
if (selected < 0)
selected = 0;
top_line -= visitems - (top_line + visible_lines == visible_items);
+ set_pressed();
}
else if (hover == HOVER_ARROW_DOWN)
{
@@ -1926,6 +1942,7 @@ void ui_menu::handle_main_events(UINT32 flags)
if (selected >= visible_items)
selected = visible_items - 1;
top_line += visible_lines - 2;
+ set_pressed();
}
else if (hover == HOVER_UI_RIGHT)
menu_event.iptkey = IPT_UI_RIGHT;
@@ -2820,3 +2837,9 @@ void ui_menu::draw_dats_menu()
// 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 != visible_items);
}
+
+void ui_menu::set_pressed()
+{
+ (m_repeat == 0) ? m_repeat = osd_ticks() + osd_ticks_per_second() / 2 : m_repeat = osd_ticks() + osd_ticks_per_second() / 4;
+ m_pressed = true;
+} \ No newline at end of file
diff --git a/src/emu/ui/menu.h b/src/emu/ui/menu.h
index 562650d0e51..4a788c612c7 100644
--- a/src/emu/ui/menu.h
+++ b/src/emu/ui/menu.h
@@ -266,8 +266,15 @@ protected:
static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap;
static render_texture *hilight_main_texture;
private:
+
+ // mouse button held down
+ bool m_pressed = false;
+ osd_ticks_t m_repeat = 0;
+ void reset_pressed() { m_pressed = false; m_repeat = 0; }
+ bool mouse_pressed() { return (osd_ticks() >= m_repeat); }
+ void set_pressed();
+
static std::unique_ptr<bitmap_argb32> no_avail_bitmap, bgrnd_bitmap, star_bitmap;
-// static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap;
static render_texture *bgrnd_texture, *star_texture;
static bitmap_argb32 *icons_bitmap[];
static render_texture *icons_texture[];
diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp
index b643fcef883..8f421073144 100644
--- a/src/emu/ui/optsmenu.cpp
+++ b/src/emu/ui/optsmenu.cpp
@@ -217,7 +217,7 @@ void ui_menu_game_options::populate()
item_append(_("Filter"), main_filters::text[m_main], arrow_flags, (void *)(FPTR)FILTER_MENU);
// add category subitem
- if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty())
+ if (m_main == FILTER_CATEGORY && !machine().inifile().ini_index.empty())
{
inifile_manager &inif = machine().inifile();
int afile = inif.current_file;
@@ -233,7 +233,7 @@ void ui_menu_game_options::populate()
item_append(fbuff.c_str(), inif.actual_category().c_str(), arrow_flags, (void *)(FPTR)CATEGORY_FILTER);
}
// add manufacturer subitem
- else if (main_filters::actual == FILTER_MANUFACTURER && c_mnfct::ui.size() > 0)
+ else if (m_main == FILTER_MANUFACTURER && c_mnfct::ui.size() > 0)
{
arrow_flags = get_arrow_flags(0, c_mnfct::ui.size() - 1, c_mnfct::actual);
fbuff = _("^!Manufacturer");
@@ -241,7 +241,7 @@ void ui_menu_game_options::populate()
item_append(fbuff.c_str(), c_mnfct::ui[c_mnfct::actual].c_str(), arrow_flags, (void *)(FPTR)MANUFACT_CAT_FILTER);
}
// add year subitem
- else if (main_filters::actual == FILTER_YEAR && c_year::ui.size() > 0)
+ else if (m_main == FILTER_YEAR && c_year::ui.size() > 0)
{
arrow_flags = get_arrow_flags(0, c_year::ui.size() - 1, c_year::actual);
fbuff.assign(_("^!Year"));
@@ -249,7 +249,7 @@ void ui_menu_game_options::populate()
item_append(fbuff.c_str(), c_year::ui[c_year::actual].c_str(), arrow_flags, (void *)(FPTR)YEAR_CAT_FILTER);
}
// add custom subitem
- else if (main_filters::actual == FILTER_CUSTOM)
+ else if (m_main == FILTER_CUSTOM)
{
fbuff = _("^!Setup custom filter");
convert_command_glyph(fbuff);
diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp
index 34fdab6d64e..c3c724b900c 100644
--- a/src/emu/ui/selgame.cpp
+++ b/src/emu/ui/selgame.cpp
@@ -358,13 +358,13 @@ void ui_menu_select_game::handle()
if (!isfavorite())
{
const game_driver *driver = (const game_driver *)m_event->itemref;
- if ((FPTR)driver > 3 && machine().datfile().has_data(driver))
+ if ((FPTR)driver > skip_main_items && machine().datfile().has_data(driver))
ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, driver));
}
else
{
ui_software_info *swinfo = (ui_software_info *)m_event->itemref;
- if ((FPTR)swinfo > 3 && machine().datfile().has_data(swinfo->driver))
+ if ((FPTR)swinfo > skip_main_items && machine().datfile().has_data(swinfo->driver))
{
if (swinfo->startempty == 1)
ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, swinfo->driver));
@@ -380,7 +380,7 @@ void ui_menu_select_game::handle()
if (!isfavorite())
{
const game_driver *driver = (const game_driver *)m_event->itemref;
- if ((FPTR)driver > 3)
+ if ((FPTR)driver > skip_main_items)
{
if (!machine().favorite().isgame_favorite(driver))
{
@@ -398,7 +398,7 @@ void ui_menu_select_game::handle()
else
{
ui_software_info *swinfo = (ui_software_info *)m_event->itemref;
- if ((FPTR)swinfo > 3)
+ if ((FPTR)swinfo > skip_main_items)
{
machine().popmessage(_("%s\n removed from favorites list."), swinfo->longname.c_str());
machine().favorite().remove_favorite_game(*swinfo);
@@ -534,24 +534,26 @@ void ui_menu_select_game::populate()
}
// iterate over entries
- for (size_t curitem = 0; curitem < m_displaylist.size(); ++curitem)
+ int curitem = 0;
+ for (auto & elem : m_displaylist)
{
UINT32 flags_ui = MENU_FLAG_UI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW;
- if (old_item_selected == -1 && m_displaylist[curitem]->name == reselect_last::driver)
+ if (old_item_selected == -1 && elem->name == reselect_last::driver)
old_item_selected = curitem;
- bool cloneof = strcmp(m_displaylist[curitem]->parent, "0");
+ bool cloneof = strcmp(elem->parent, "0");
if (cloneof)
{
- int cx = driver_list::find(m_displaylist[curitem]->parent);
+ int cx = driver_list::find(elem->parent);
if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
cloneof = false;
}
if (cloneof)
flags_ui |= MENU_FLAG_INVERT;
- item_append(m_displaylist[curitem]->description, nullptr, flags_ui, (void *)m_displaylist[curitem]);
+ item_append(elem->description, nullptr, flags_ui, (void *)elem);
+ curitem++;
}
}
}
diff --git a/src/emu/ui/selsoft.cpp b/src/emu/ui/selsoft.cpp
index 2c8fa5135ea..93be1b636ba 100644
--- a/src/emu/ui/selsoft.cpp
+++ b/src/emu/ui/selsoft.cpp
@@ -2040,7 +2040,7 @@ void ui_bios_selection::handle()
{
// process the menu
const ui_menu_event *event = process(0);
- ui_options &moptions = machine().ui().options();
+ emu_options &moptions = machine().options();
if (event != nullptr && event->iptkey == IPT_UI_SELECT && event->itemref != nullptr)
for (auto & elem : m_bios)
if ((void*)&elem.name == event->itemref)
@@ -2073,7 +2073,7 @@ void ui_bios_selection::handle()
drivlist.next();
software_list_device *swlist = software_list_device::find_by_name(drivlist.config(), ui_swinfo->listname.c_str());
software_info *swinfo = swlist->find(ui_swinfo->shortname.c_str());
- if (!moptions.skip_parts_menu() && swinfo->has_multiple_parts(ui_swinfo->interface.c_str()))
+ if (!machine().ui().options().skip_parts_menu() && swinfo->has_multiple_parts(ui_swinfo->interface.c_str()))
{
std::unordered_map<std::string, std::string> parts;
for (const software_part *swpart = swinfo->first_part(); swpart != nullptr; swpart = swpart->next())
diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp
index e4f1ef738e0..7feb39a1a71 100644
--- a/src/emu/validity.cpp
+++ b/src/emu/validity.cpp
@@ -15,19 +15,6 @@
//**************************************************************************
-// COMPILE-TIME VALIDATION
-//**************************************************************************
-
-// if the following lines error during compile, your PTR64 switch is set incorrectly in the makefile
-#ifdef PTR64
-UINT8 your_ptr64_flag_is_wrong[(int)(sizeof(void *) - 7)];
-#else
-UINT8 your_ptr64_flag_is_wrong[(int)(5 - sizeof(void *))];
-#endif
-
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -350,9 +337,9 @@ void validity_checker::validate_core()
// check pointer size
#ifdef PTR64
- if (sizeof(void *) != 8) osd_printf_error("PTR64 flag enabled, but was compiled for 32-bit target\n");
+ static_assert(sizeof(void *) == 8, "PTR64 flag enabled, but was compiled for 32-bit target\n");
#else
- if (sizeof(void *) != 4) osd_printf_error("PTR64 flag not enabled, but was compiled for 64-bit target\n");
+ static_assert(sizeof(void *) == 4, "PTR64 flag not enabled, but was compiled for 64-bit target\n");
#endif
// TODO: check if this is actually working
@@ -377,9 +364,6 @@ void validity_checker::validate_inlines()
#undef rand
volatile UINT64 testu64a = rand() ^ (rand() << 15) ^ ((UINT64)rand() << 30) ^ ((UINT64)rand() << 45);
volatile INT64 testi64a = rand() ^ (rand() << 15) ^ ((INT64)rand() << 30) ^ ((INT64)rand() << 45);
-#ifdef PTR64
- volatile INT64 testi64b = rand() ^ (rand() << 15) ^ ((INT64)rand() << 30) ^ ((INT64)rand() << 45);
-#endif
volatile UINT32 testu32a = rand() ^ (rand() << 15);
volatile UINT32 testu32b = rand() ^ (rand() << 15);
volatile INT32 testi32a = rand() ^ (rand() << 15);
@@ -395,10 +379,6 @@ void validity_checker::validate_inlines()
if (testu64a == 0) testu64a++;
if (testi64a == 0) testi64a++;
else if (testi64a < 0) testi64a = -testi64a;
-#ifdef PTR64
- if (testi64b == 0) testi64b++;
- else if (testi64b < 0) testi64b = -testi64b;
-#endif
if (testu32a == 0) testu32a++;
if (testu32b == 0) testu32b++;
if (testi32a == 0) testi32a++;
diff --git a/src/ldplayer/layout/LICENSE b/src/ldplayer/layout/LICENSE
new file mode 100644
index 00000000000..670154e3538
--- /dev/null
+++ b/src/ldplayer/layout/LICENSE
@@ -0,0 +1,116 @@
+CC0 1.0 Universal
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific
+works ("Commons") that the public can reliably and without fear of later
+claims of infringement build upon, modify, incorporate in other works, reuse
+and redistribute as freely as possible in any form whatsoever and for any
+purposes, including without limitation commercial purposes. These owners may
+contribute to the Commons to promote the ideal of a free culture and the
+further production of creative, cultural and scientific works, or to gain
+reputation or greater distribution for their Work in part through the use and
+efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation
+of additional consideration or compensation, the person associating CC0 with a
+Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+and publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not limited
+to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
+ and translate a Work;
+
+ ii. moral rights retained by the original author(s) and/or performer(s);
+
+ iii. publicity and privacy rights pertaining to a person's image or likeness
+ depicted in a Work;
+
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+
+ v. rights protecting the extraction, dissemination, use and reuse of data in
+ a Work;
+
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation thereof,
+ including any amended or successor version of such directive); and
+
+ vii. other similar, equivalent or corresponding rights throughout the world
+ based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer's heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free,
+non transferable, non sublicensable, non exclusive, irrevocable and
+unconditional license to exercise Affirmer's Copyright and Related Rights in
+the Work (i) in all territories worldwide, (ii) for the maximum duration
+provided by applicable law or treaty (including future time extensions), (iii)
+in any current or future medium and for any number of copies, and (iv) for any
+purpose whatsoever, including without limitation commercial, advertising or
+promotional purposes (the "License"). The License shall be deemed effective as
+of the date CC0 was applied by Affirmer to the Work. Should any part of the
+License for any reason be judged legally invalid or ineffective under
+applicable law, such partial invalidity or ineffectiveness shall not
+invalidate the remainder of the License, and in such case Affirmer hereby
+affirms that he or she will not (i) exercise any of his or her remaining
+Copyright and Related Rights in the Work or (ii) assert any associated claims
+and causes of action with respect to the Work, in either case contrary to
+Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+
+ b. Affirmer offers the Work as-is and makes no representations or warranties
+ of any kind concerning the Work, express, implied, statutory or otherwise,
+ including without limitation warranties of title, merchantability, fitness
+ for a particular purpose, non infringement, or the absence of latent or
+ other defects, accuracy, or the present or absence of errors, whether or not
+ discoverable, all to the greatest extent permissible under applicable law.
+
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without limitation
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
+ disclaims responsibility for obtaining any necessary consents, permissions
+ or other rights required for any use of the Work.
+
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to this
+ CC0 or use of the Work.
+
+For more information, please see
+<http://creativecommons.org/publicdomain/zero/1.0/>
diff --git a/src/ldplayer/layout/README.md b/src/ldplayer/layout/README.md
new file mode 100644
index 00000000000..78ef2e5e6ad
--- /dev/null
+++ b/src/ldplayer/layout/README.md
@@ -0,0 +1,6 @@
+# **Layout** #
+
+Layouts files are definiton files to describe look and fell of emulated machines, and are product
+of many different contributors.
+
+Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file
diff --git a/src/lib/formats/atom_dsk.cpp b/src/lib/formats/atom_dsk.cpp
index 6a5294a8fb8..36e4eeab69a 100644
--- a/src/lib/formats/atom_dsk.cpp
+++ b/src/lib/formats/atom_dsk.cpp
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Carl
#include "atom_dsk.h"
atom_format::atom_format() : wd177x_format(formats)
diff --git a/src/lib/formats/atom_dsk.h b/src/lib/formats/atom_dsk.h
index 7f64810e87c..03a4a0688f3 100644
--- a/src/lib/formats/atom_dsk.h
+++ b/src/lib/formats/atom_dsk.h
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Carl
#ifndef __ATOM_DSK_H__
#define __ATOM_DSK_H__
diff --git a/src/lib/netlist/macro/nlm_cd4xxx.cpp b/src/lib/netlist/macro/nlm_cd4xxx.cpp
index e8ffede2aa8..f7eda575bab 100644
--- a/src/lib/netlist/macro/nlm_cd4xxx.cpp
+++ b/src/lib/netlist/macro/nlm_cd4xxx.cpp
@@ -1,4 +1,5 @@
-
+// license:GPL-2.0+
+// copyright-holders:Couriersud
#include "nlm_cd4xxx.h"
#include "devices/nld_truthtable.h"
diff --git a/src/lib/netlist/macro/nlm_cd4xxx.h b/src/lib/netlist/macro/nlm_cd4xxx.h
index 94c5d04aef8..ebfb58740b2 100644
--- a/src/lib/netlist/macro/nlm_cd4xxx.h
+++ b/src/lib/netlist/macro/nlm_cd4xxx.h
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
#ifndef NLD_CD4XXX_H_
#define NLD_CD4XXX_H_
diff --git a/src/lib/netlist/macro/nlm_opamp.cpp b/src/lib/netlist/macro/nlm_opamp.cpp
index 9d246ebb04f..c3a932c0a35 100644
--- a/src/lib/netlist/macro/nlm_opamp.cpp
+++ b/src/lib/netlist/macro/nlm_opamp.cpp
@@ -1,4 +1,5 @@
-
+// license:GPL-2.0+
+// copyright-holders:Couriersud
#include "nlm_opamp.h"
#include "analog/nld_opamps.h"
diff --git a/src/lib/netlist/macro/nlm_opamp.h b/src/lib/netlist/macro/nlm_opamp.h
index 8612f72e453..c0d6a0b158f 100644
--- a/src/lib/netlist/macro/nlm_opamp.h
+++ b/src/lib/netlist/macro/nlm_opamp.h
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
#ifndef NLM_OPAMP_H_
#define NLM_OPAMP_H_
diff --git a/src/lib/netlist/macro/nlm_other.cpp b/src/lib/netlist/macro/nlm_other.cpp
index e3d53def922..9a5e54af737 100644
--- a/src/lib/netlist/macro/nlm_other.cpp
+++ b/src/lib/netlist/macro/nlm_other.cpp
@@ -1,4 +1,5 @@
-
+// license:GPL-2.0+
+// copyright-holders:Couriersud
#include "nlm_other.h"
#include "devices/nld_truthtable.h"
diff --git a/src/lib/netlist/macro/nlm_other.h b/src/lib/netlist/macro/nlm_other.h
index cc104968ed3..76f8dd781d5 100644
--- a/src/lib/netlist/macro/nlm_other.h
+++ b/src/lib/netlist/macro/nlm_other.h
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
#ifndef NLM_OTHER_H_
#define NLM_OTHER_H_
diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp
index c9c33aceaeb..c06aa2e45d4 100644
--- a/src/lib/netlist/macro/nlm_ttl74xx.cpp
+++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp
@@ -1,4 +1,5 @@
-
+// license:GPL-2.0+
+// copyright-holders:Couriersud
#include "nlm_ttl74xx.h"
#include "devices/nld_truthtable.h"
diff --git a/src/lib/netlist/macro/nlm_ttl74xx.h b/src/lib/netlist/macro/nlm_ttl74xx.h
index 0fed60235c1..8ae8819480f 100644
--- a/src/lib/netlist/macro/nlm_ttl74xx.h
+++ b/src/lib/netlist/macro/nlm_ttl74xx.h
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
#ifndef NLD_TTL74XX_H_
#define NLD_TTL74XX_H_
diff --git a/src/lib/netlist/prg/nlwav.cpp b/src/lib/netlist/prg/nlwav.cpp
index bba12ca1152..408cc65589e 100644
--- a/src/lib/netlist/prg/nlwav.cpp
+++ b/src/lib/netlist/prg/nlwav.cpp
@@ -1,3 +1,5 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
#include <cstdio>
#include <cstring>
#include "plib/poptions.h"
diff --git a/src/lib/util/strformat.h b/src/lib/util/strformat.h
index f0f481bb3f3..dc8061ca944 100644
--- a/src/lib/util/strformat.h
+++ b/src/lib/util/strformat.h
@@ -185,6 +185,21 @@
#include <type_traits>
#include <utility>
+#if defined(__GNUC__) && ((__GNUC__ == 5 && __GNUC_MINOR__ < 2) || (__GNUC__ == 4 && __GNUC_MINOR__ > 8))
+namespace std
+{
+template<class _Container>
+ inline constexpr auto
+ cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont)))-> decltype(std::begin(__cont))
+ { return std::begin(__cont); }
+
+template<class _Container>
+ inline constexpr auto
+ cend(const _Container& __cont) noexcept(noexcept(std::end(__cont)))-> decltype(std::end(__cont))
+ { return std::end(__cont); }
+}
+#endif
+
namespace util {
namespace detail {
//**************************************************************************
@@ -1497,11 +1512,11 @@ private:
// CORE FORMATTING FUNCTION
//**************************************************************************
-template <typename Stream, typename Format>
-typename Stream::off_type stream_format(Stream &str, Format const &args)
+template <typename Stream, typename Base>
+typename Stream::off_type stream_format(Stream &str, format_argument_pack<Base> const &args)
{
- typedef format_helper<std::remove_cv_t<Format> > format_helper;
- typedef typename Format::iterator iterator;
+ typedef format_helper<format_argument_pack<Base> > format_helper;
+ typedef typename format_argument_pack<Base>::iterator iterator;
class stream_preserver
{
public:
@@ -1681,41 +1696,41 @@ inline String string_format(std::locale const &locale, Format &&fmt, Params &&..
return str.str();
};
-template <typename String = std::string, typename Format, typename Stream>
-inline String string_format(Format &&fmt, detail::format_argument_pack<Stream> const &args)
+template <typename String = std::string, typename Stream>
+inline String string_format(detail::format_argument_pack<Stream> const &args)
{
typedef std::basic_ostringstream<typename String::value_type, typename String::traits_type, typename String::allocator_type> ostream;
ostream str;
- stream_format(str, std::forward<Format>(fmt), args);
+ detail::stream_format(str, args);
return str.str();
};
-template <typename String = std::string, typename Format, typename Stream>
-inline String string_format(Format &&fmt, detail::format_argument_pack<Stream> &&args)
+template <typename String = std::string, typename Stream>
+inline String string_format(detail::format_argument_pack<Stream> &&args)
{
typedef std::basic_ostringstream<typename String::value_type, typename String::traits_type, typename String::allocator_type> ostream;
ostream str;
- stream_format(str, std::forward<Format>(fmt), std::move(args));
+ detail::stream_format(str, std::move(args));
return str.str();
};
-template <typename String = std::string, typename Format, typename Stream>
-inline String string_format(std::locale const &locale, Format &&fmt, detail::format_argument_pack<Stream> const &args)
+template <typename String = std::string, typename Stream>
+inline String string_format(std::locale const &locale, detail::format_argument_pack<Stream> const &args)
{
typedef std::basic_ostringstream<typename String::value_type, typename String::traits_type, typename String::allocator_type> ostream;
ostream str;
str.imbue(locale);
- stream_format(str, std::forward<Format>(fmt), args);
+ detail::stream_format(str, args);
return str.str();
};
-template <typename String = std::string, typename Format, typename Stream>
-inline String string_format(std::locale const &locale, Format &&fmt, detail::format_argument_pack<Stream> &&args)
+template <typename String = std::string, typename Stream>
+inline String string_format(std::locale const &locale, detail::format_argument_pack<Stream> &&args)
{
typedef std::basic_ostringstream<typename String::value_type, typename String::traits_type, typename String::allocator_type> ostream;
ostream str;
str.imbue(locale);
- stream_format(str, std::forward<Format>(fmt), std::move(args));
+ detail::stream_format(str, std::move(args));
return str.str();
};
diff --git a/src/mame/audio/flower.cpp b/src/mame/audio/flower.cpp
deleted file mode 100644
index fc8ef87b559..00000000000
--- a/src/mame/audio/flower.cpp
+++ /dev/null
@@ -1,337 +0,0 @@
-// license:???
-// copyright-holders:hap, insideoutboy
-/* Clarue Flower sound driver.
-Initial version was based on the Wiping sound driver, which was based on the old namco.c sound driver.
-
-TODO:
-- timing (see main driver file), but also of samplerate and effects counter
-- what do the unknown bits in soundregs do?
-- Are channel effects correct? It's currently mostly guesswork, the pitch effects sound pretty convincing though.
- Considering that the game sound hardware isn't complicated (no dedicated soundchip) these bits are possibly
- for something way simpler, such as a length counter. PCB sound recordings would be useful!
-
-*/
-
-#include "emu.h"
-#include "includes/flower.h"
-
-#define FLOWER_VERBOSE 0 // show register writes
-
-#define MIXER_SAMPLERATE 48000 /* ? (native freq is probably in the MHz range) */
-#define MIXER_DEFGAIN 48
-
-
-const device_type FLOWER = &device_creator<flower_sound_device>;
-
-flower_sound_device::flower_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, FLOWER, "Flower Audio Custom", tag, owner, clock, "flower_sound", __FILE__),
- device_sound_interface(mconfig, *this)
-{
-}
-
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void flower_sound_device::device_config_complete()
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void flower_sound_device::device_start()
-{
- flower_sound_channel *voice;
-
- m_effect_timer = timer_alloc(TIMER_CLOCK_EFFECT);
- m_stream = machine().sound().stream_alloc(*this, 0, 1, MIXER_SAMPLERATE);
- m_mixer_buffer = std::make_unique<short[]>(MIXER_SAMPLERATE);
- make_mixer_table(8, MIXER_DEFGAIN);
-
- /* extract globals from the interface */
- m_last_channel = m_channel_list + 8;
-
- m_sample_rom = machine().root_device().memregion("sound1")->base();
- m_volume_rom = machine().root_device().memregion("sound2")->base();
-
- /* register for savestates */
- for (int i = 0; i < 8; i++)
- {
- voice = &m_channel_list[i];
-
- save_item(NAME(voice->freq), i+1);
- save_item(NAME(voice->pos), i+1);
- save_item(NAME(voice->volume), i+1);
- save_item(NAME(voice->voltab), i+1);
- save_item(NAME(voice->effect), i+1);
- save_item(NAME(voice->ecount), i+1);
- save_item(NAME(voice->oneshot), i+1);
- save_item(NAME(voice->active), i+1);
- save_item(NAME(voice->start), i+1);
- }
-}
-
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void flower_sound_device::device_reset()
-{
- flower_sound_channel *voice;
- attotime period;
-
- /* reset effect timer, period is unknown/guessed */
- period = attotime::from_hz(MIXER_SAMPLERATE / 256);
- m_effect_timer->adjust(period, 0, period);
-
- /* reset all the voices */
- for (auto & elem : m_channel_list)
- {
- voice = &elem;
-
- voice->freq = 0;
- voice->pos = 0;
- voice->volume = 0;
- voice->voltab = 0;
- voice->effect = 0;
- voice->ecount = 0;
- voice->oneshot = 1;
- voice->active = 0;
- voice->start = 0;
- }
-
- memset(m_soundregs1, 0, 0x40);
- memset(m_soundregs2, 0, 0x40);
-}
-
-/* build a table to divide by the number of voices; gain is specified as gain*16 */
-void flower_sound_device::make_mixer_table(int voices, int gain)
-{
- int count = voices * 128;
-
- /* allocate memory */
- m_mixer_table = std::make_unique<INT16[]>(256 * voices);
-
- /* find the middle of the table */
- m_mixer_lookup = m_mixer_table.get() + (128 * voices);
-
- /* fill in the table - 16 bit case */
- for (int i = 0; i < count; i++)
- {
- int val = i * gain * 16 / voices;
- if (val > 32767) val = 32767;
- m_mixer_lookup[ i] = val;
- m_mixer_lookup[-i] =-val;
- }
-}
-
-
-/* clock sound channel effect counters */
-void flower_sound_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
-{
- switch (id)
- {
- case TIMER_CLOCK_EFFECT:
- flower_sound_channel *voice;
- m_stream->update();
-
- for (voice = m_channel_list; voice < m_last_channel; voice++)
- voice->ecount += (voice->ecount < (1<<22));
- break;
-
- default:
- assert_always(FALSE, "Unknown id in flower_sound_device::device_timer");
- }
-}
-
-/********************************************************************************/
-
-#if FLOWER_VERBOSE
-static int r_numwrites[2][8] = {{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0}};
-void flower_sound_device::show_soundregs()
-{
- int set,reg,chan;
- char text[0x100];
- char message[0x1000] = {0};
- UINT8 *base = m_soundregs1;
-
- for (set=0;set<2;set++)
- {
- for (reg=0;reg<8;reg++)
- {
- sprintf(text,"R%d%d:",set+1,reg);
- strcat(message,text);
-
- for (chan=0;chan<8;chan++)
- {
- sprintf(text," %02X",base[reg + 8*chan]);
- strcat(message,text);
- }
- sprintf(text," - %07d\n",r_numwrites[set][reg]);
- strcat(message,text);
- }
- strcat(message,"\n");
- base = m_soundregs2;
- }
- popmessage("%s",message);
-}
-#endif // FLOWER_VERBOSE
-
-
-/* register functions (preliminary):
-offset: cccrrr c=channel, r=register
-
-set 1:
-R 76543210
-0 xxxxxxxx frequency (which nibble?)
-1 xxxxxxxx *
-2 xxxxxxxx *
-3 xxxxxxxx *
-4 ...x.... one-shot sample
-5 ...x.... ??? same as R4?
-6 ........ unused
-7 xxxx.... volume
-
-set 2:
-R 76543210
-0 ....xxxx start address
-1 ....xxxx *
-2 ....xxxx *
-3 ....xxxx *
-4 xxxx assume it's channel pitch/volume effects
- xxxx start address
-5 x... ???
- xxxx start address
-6 ........ unused
-7 ......xx volume table + start trigger
-
-*/
-
-WRITE8_MEMBER( flower_sound_device::sound1_w )
-{
- flower_sound_channel *voice = &m_channel_list[offset >> 3 & 7];
- int c = offset & 0xf8;
- UINT8 *base1 = m_soundregs1;
-// UINT8 *base2 = m_soundregs2;
-
- m_stream->update();
- base1[offset] = data;
-#if FLOWER_VERBOSE
- r_numwrites[0][offset & 7]++;
- show_soundregs();
-#endif
-
- // recompute voice parameters
- voice->freq = (base1[c+2] & 0xf) << 12 | (base1[c+3] & 0xf) << 8 | (base1[c+0] & 0xf) << 4 | (base1[c+1] & 0xf);
- voice->volume = base1[c+7] >> 4;
-}
-
-WRITE8_MEMBER( flower_sound_device::sound2_w )
-{
- flower_sound_channel *voice = &m_channel_list[offset >> 3 & 7];
- int i, c = offset & 0xf8;
- UINT8 *base1 = m_soundregs1;
- UINT8 *base2 = m_soundregs2;
-
- m_stream->update();
- base2[offset] = data;
-#if FLOWER_VERBOSE
- r_numwrites[1][offset & 7]++;
- show_soundregs();
-#endif
-
- // reg 7 is start trigger!
- if ((offset & 7) != 7)
- return;
-
- voice->voltab = (base2[c+7] & 3) << 4;
- voice->oneshot = (~base1[c+4] & 0x10) >> 4;
- voice->effect = base2[c+4] >> 4;
- voice->ecount = 0;
- voice->pos = 0;
- voice->active = 1;
-
- // full start address is 6 nibbles
- voice->start = 0;
- for (i = 5; i >= 0; i--)
- voice->start = (voice->start << 4) | (base2[c+i] & 0xf);
-}
-
-
-//-------------------------------------------------
-// sound_stream_update - handle a stream update
-//-------------------------------------------------
-
-void flower_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
-{
- stream_sample_t *buffer = outputs[0];
- flower_sound_channel *voice;
- short *mix;
- int i;
-
- /* zap the contents of the mixer buffer */
- memset(m_mixer_buffer.get(), 0, samples * sizeof(short));
-
- /* loop over each voice and add its contribution */
- for (voice = m_channel_list; voice < m_last_channel; voice++)
- {
- int f = voice->freq;
- int v = voice->volume;
-
- if (!voice->active)
- continue;
-
- // effects
- // bit 0: volume slide down?
- if (voice->effect & 1 && !voice->oneshot)
- {
- // note: one-shot samples are fixed volume
- v -= (voice->ecount >> 4);
- if (v < 0) v = 0;
- }
- // bit 1: used often, but hard to figure out what for
- // bit 2: probably pitch slide
- if (voice->effect & 4)
- {
- f -= (voice->ecount << 7);
- if (f < 0) f = 0;
- }
- // bit 3: not used much, maybe pitch slide the other way?
-
- v |= voice->voltab;
- mix = m_mixer_buffer.get();
-
- for (i = 0; i < samples; i++)
- {
- // add sample
- if (voice->oneshot)
- {
- UINT8 sample = m_sample_rom[(voice->start + voice->pos) >> 7 & 0x7fff];
- if (sample == 0xff)
- {
- voice->active = 0;
- break;
- }
- else
- *mix++ += m_volume_rom[v << 8 | sample] - 0x80;
- }
- else
- {
- UINT8 sample = m_sample_rom[(voice->start >> 7 & 0x7e00) | (voice->pos >> 7 & 0x1ff)];
- *mix++ += m_volume_rom[v << 8 | sample] - 0x80;
- }
-
- // update counter
- voice->pos += f;
- }
- }
-
- /* mix it down */
- mix = m_mixer_buffer.get();
- for (i = 0; i < samples; i++)
- *buffer++ = m_mixer_lookup[*mix++];
-}
diff --git a/src/mame/audio/nl_kidniki.inc b/src/mame/audio/nl_kidniki.inc
index bdb178f82c4..d9040214583 100644
--- a/src/mame/audio/nl_kidniki.inc
+++ b/src/mame/audio/nl_kidniki.inc
@@ -1,4 +1,5 @@
-
+// license:BSD-3-Clause
+// copyright-holders:Andrew Gardner, Couriersud
#include "netlist/devices/net_lib.h"
#ifndef USE_FRONTIERS
diff --git a/src/mame/audio/segam1audio.cpp b/src/mame/audio/segam1audio.cpp
index 3e5a37120a3..0eb84eed88a 100644
--- a/src/mame/audio/segam1audio.cpp
+++ b/src/mame/audio/segam1audio.cpp
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert
+// copyright-holders:R. Belmont
/***************************************************************************
Sega Model 1 sound board (68000 + 2x 315-5560 "MultiPCM")
@@ -16,7 +16,8 @@
#define YM3438_TAG "m1ym"
static ADDRESS_MAP_START( segam1audio_map, AS_PROGRAM, 16, segam1audio_device )
- AM_RANGE(0x000000, 0x0bffff) AM_ROM AM_REGION(":m1sndcpu", 0)
+ AM_RANGE(0x000000, 0x03ffff) AM_ROM AM_REGION(":m1sndcpu", 0)
+ AM_RANGE(0x080000, 0x09ffff) AM_ROM AM_REGION(":m1sndcpu", 0x20000) // mirror of upper ROM socket
AM_RANGE(0xc20000, 0xc20001) AM_READWRITE(m1_snd_68k_latch_r, m1_snd_68k_latch1_w )
AM_RANGE(0xc20002, 0xc20003) AM_READWRITE(m1_snd_v60_ready_r, m1_snd_68k_latch2_w )
AM_RANGE(0xc40000, 0xc40007) AM_DEVREADWRITE8(MULTIPCM_1_TAG, multipcm_device, read, write, 0x00ff )
diff --git a/src/mame/audio/segam1audio.h b/src/mame/audio/segam1audio.h
index e188a5502a4..9cba756c5e2 100644
--- a/src/mame/audio/segam1audio.h
+++ b/src/mame/audio/segam1audio.h
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert
+// copyright-holders:R. Belmont
#pragma once
#ifndef __SEGAM1AUDIO_H__
diff --git a/src/mame/drivers/aerofgt.cpp b/src/mame/drivers/aerofgt.cpp
index af333697ce9..2ad00982f1a 100644
--- a/src/mame/drivers/aerofgt.cpp
+++ b/src/mame/drivers/aerofgt.cpp
@@ -129,10 +129,9 @@ WRITE16_MEMBER(aerofgt_state::aerfboo2_okim6295_banking_w)
WRITE8_MEMBER(aerofgt_state::aerfboot_okim6295_banking_w)
{
- UINT8 *oki = memregion("oki")->base();
/*bit 2 (0x4) setted too?*/
if (data & 0x4)
- memcpy(&oki[0x20000], &oki[((data & 0x3) * 0x20000) + 0x40000], 0x20000);
+ membank("okibank")->set_entry(data & 0x3);
}
static ADDRESS_MAP_START( pspikes_map, AS_PROGRAM, 16, aerofgt_state )
@@ -418,6 +417,11 @@ static ADDRESS_MAP_START( karatblzbl_sound_map, AS_PROGRAM, 8, aerofgt_state )
AM_RANGE(0x7800, 0x7fff) AM_RAM
ADDRESS_MAP_END
+static ADDRESS_MAP_START( oki_map, AS_0, 8, aerofgt_state ) //only for aerfboot for now
+ AM_RANGE(0x00000, 0x1ffff) AM_ROM
+ AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("okibank")
+ADDRESS_MAP_END
+
static INPUT_PORTS_START( pspikes )
PORT_START("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
@@ -1799,6 +1803,7 @@ static MACHINE_CONFIG_START( aerfboot, aerofgt_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
+ MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -2696,9 +2701,9 @@ ROM_START( aerfboot )
ROM_LOAD( "afb_ep13.td", 0x000000, 0x40000, CRC(1830f70c) SHA1(1759de9b56e4999defc08b2423eff38ec98c4f17) )
ROM_LOAD( "afb_ep11.tb", 0x040000, 0x40000, CRC(6298c0eb) SHA1(ede63849973742c67637eac0ec9cda95ea2ecebc) )
- ROM_REGION( 0xc0000, "oki", ROMREGION_ERASEFF ) /* sound samples */
+ ROM_REGION( 0xa0000, "oki", ROMREGION_ERASEFF ) /* sound samples */
ROM_LOAD( "afb_ep5.u29", 0x000000, 0x20000, CRC(3559609a) SHA1(6f0b633bf74f41487fc98dcdc43a83eb67f3d14c) )
- ROM_LOAD( "afb_ep4.u30", 0x040000, 0x80000, CRC(f9652163) SHA1(d8c1fcf44b350cc65378869e4eb188ea232b4948) )
+ ROM_LOAD( "afb_ep4.u30", 0x020000, 0x80000, CRC(f9652163) SHA1(d8c1fcf44b350cc65378869e4eb188ea232b4948) )
ROM_END
ROM_START( aerfboo2 )
@@ -2756,6 +2761,12 @@ ROM_START( wbbc97 )
ROM_END
+DRIVER_INIT_MEMBER(aerofgt_state, banked_oki)
+{
+ membank("okibank")->configure_entries(0, 4, memregion("oki")->base() + 0x20000, 0x20000);
+}
+
+
GAME( 1990, spinlbrk, 0, spinlbrk, spinlbrk, driver_device, 0, ROT0, "V-System Co.", "Spinal Breakers (World)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
GAME( 1990, spinlbrku,spinlbrk, spinlbrk, spinlbrku, driver_device,0, ROT0, "V-System Co.", "Spinal Breakers (US)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
GAME( 1990, spinlbrkj,spinlbrk, spinlbrk, spinlbrk, driver_device, 0, ROT0, "V-System Co.", "Spinal Breakers (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
@@ -2785,5 +2796,5 @@ GAME( 1992, aerofgt, 0, aerofgt, aerofgt, driver_device, 0, ROT270, "V
GAME( 1992, aerofgtb, aerofgt, aerofgtb, aerofgtb, driver_device, 0, ROT270, "Video System Co.", "Aero Fighters (Taiwan / Japan, set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL ) // probably intended for Taiwan because the Japanese name is Sonic Wings (below)
GAME( 1992, aerofgtc, aerofgt, aerofgtb, aerofgtb, driver_device, 0, ROT270, "Video System Co.", "Aero Fighters (Taiwan / Japan, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
GAME( 1992, sonicwi, aerofgt, aerofgtb, aerofgtb, driver_device, 0, ROT270, "Video System Co.", "Sonic Wings (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
-GAME( 1992, aerfboot, aerofgt, aerfboot, aerofgtb, driver_device, 0, ROT270, "bootleg", "Aero Fighters (bootleg set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND )
+GAME( 1992, aerfboot, aerofgt, aerfboot, aerofgtb, aerofgt_state, banked_oki, ROT270, "bootleg", "Aero Fighters (bootleg set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND )
GAME( 1992, aerfboo2, aerofgt, aerfboo2, aerofgtb, driver_device, 0, ROT270, "bootleg", "Aero Fighters (bootleg set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND )
diff --git a/src/mame/drivers/amstr_pc.cpp b/src/mame/drivers/amstr_pc.cpp
index d33fa47a6b3..8b1558a4575 100644
--- a/src/mame/drivers/amstr_pc.cpp
+++ b/src/mame/drivers/amstr_pc.cpp
@@ -71,8 +71,6 @@ public:
DECLARE_READ8_MEMBER( pc1640_port4278_r );
DECLARE_READ8_MEMBER( pc1640_port278_r );
- DECLARE_DRIVER_INIT(pc1640);
-
struct {
UINT8 x,y; //byte clipping needed
} m_mouse;
@@ -86,45 +84,30 @@ public:
int m_dipstate;
};
-static ADDRESS_MAP_START( ppc512_map, AS_PROGRAM, 16, amstrad_pc_state )
- AM_RANGE(0x00000, 0x7ffff) AM_RAMBANK("bank10")
- AM_RANGE(0x80000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
-ADDRESS_MAP_END
-
static ADDRESS_MAP_START( ppc640_map, AS_PROGRAM, 16, amstrad_pc_state )
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
-static ADDRESS_MAP_START(ppc512_io, AS_IO, 16, amstrad_pc_state )
- AM_RANGE(0x0060, 0x0065) AM_READWRITE8(pc1640_port60_r, pc1640_port60_w, 0xffff)
- AM_RANGE(0x0070, 0x0071) AM_DEVREADWRITE8("rtc", mc146818_device, read, write, 0xffff)
- AM_RANGE(0x0078, 0x0079) AM_READWRITE8(pc1640_mouse_x_r, pc1640_mouse_x_w, 0xffff)
- AM_RANGE(0x007a, 0x007b) AM_READWRITE8(pc1640_mouse_y_r, pc1640_mouse_y_w, 0xffff)
- AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
- AM_RANGE(0x0278, 0x027b) AM_READ8(pc200_port278_r, 0xffff) AM_DEVWRITE8("lpt_2", pc_lpt_device, write, 0x00ff)
- AM_RANGE(0x0378, 0x037b) AM_READ8(pc200_port378_r, 0xffff) AM_DEVWRITE8("lpt_1", pc_lpt_device, write, 0x00ff)
- AM_RANGE(0x03bc, 0x03bf) AM_DEVREADWRITE8("lpt_0", pc_lpt_device, read, write, 0x00ff)
+static ADDRESS_MAP_START( pc2086_map, AS_PROGRAM, 16, amstrad_pc_state )
+ AM_RANGE(0xc0000, 0xc9fff) AM_ROM AM_REGION("bios", 0)
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0x10000)
ADDRESS_MAP_END
static ADDRESS_MAP_START(pc200_io, AS_IO, 16, amstrad_pc_state )
AM_RANGE(0x0060, 0x0065) AM_READWRITE8(pc1640_port60_r, pc1640_port60_w, 0xffff)
AM_RANGE(0x0078, 0x0079) AM_READWRITE8(pc1640_mouse_x_r, pc1640_mouse_x_w, 0xffff)
AM_RANGE(0x007a, 0x007b) AM_READWRITE8(pc1640_mouse_y_r, pc1640_mouse_y_w, 0xffff)
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", pc_noppi_mb_device, map, 0xffff)
AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
AM_RANGE(0x0278, 0x027b) AM_READ8(pc200_port278_r, 0xffff) AM_DEVWRITE8("lpt_2", pc_lpt_device, write, 0x00ff)
AM_RANGE(0x0378, 0x037b) AM_READ8(pc200_port378_r, 0xffff) AM_DEVWRITE8("lpt_1", pc_lpt_device, write, 0x00ff)
AM_RANGE(0x03bc, 0x03bf) AM_DEVREADWRITE8("lpt_0", pc_lpt_device, read, write, 0x00ff)
ADDRESS_MAP_END
+static ADDRESS_MAP_START(ppc512_io, AS_IO, 16, amstrad_pc_state )
+ AM_RANGE(0x0070, 0x0071) AM_DEVREADWRITE8("rtc", mc146818_device, read, write, 0xffff)
+ AM_IMPORT_FROM(pc200_io)
+ADDRESS_MAP_END
/* pc20 (v2)
fc078
@@ -250,14 +233,6 @@ port 03de write/read
7d 01 01 mouse button right
*/
-DRIVER_INIT_MEMBER(amstrad_pc_state,pc1640)
-{
- address_space &io_space = m_maincpu->space( AS_IO );
-
- io_space.install_read_handler(0x278, 0x27b, read8_delegate(FUNC(amstrad_pc_state::pc1640_port278_r),this), 0xffff);
- io_space.install_read_handler(0x4278, 0x427b, read8_delegate(FUNC(amstrad_pc_state::pc1640_port4278_r),this), 0xffff);
-}
-
WRITE8_MEMBER( amstrad_pc_state::pc1640_port60_w )
{
switch (offset) {
@@ -525,14 +500,17 @@ static MACHINE_CONFIG_START( pc200, amstrad_pc_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("512K")
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( pc2086, pc200 )
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_PROGRAM_MAP(pc2086_map)
+MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( ppc512, pc200 )
- MCFG_DEVICE_REMOVE("maincpu")
-
- MCFG_CPU_ADD("maincpu", V30, 8000000)
- MCFG_CPU_PROGRAM_MAP(ppc512_map)
+static MACHINE_CONFIG_DERIVED( ppc640, pc200 )
+ MCFG_CPU_REPLACE("maincpu", V30, 8000000)
+ MCFG_CPU_PROGRAM_MAP(ppc640_map)
MCFG_CPU_IO_MAP(ppc512_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
@@ -542,9 +520,10 @@ static MACHINE_CONFIG_DERIVED( ppc512, pc200 )
MCFG_MC146818_ADD( "rtc", XTAL_32_768kHz )
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( ppc640, ppc512 )
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(ppc640_map)
+static MACHINE_CONFIG_DERIVED( ppc512, ppc640 )
+ MCFG_DEVICE_MODIFY(RAM_TAG)
+ MCFG_RAM_DEFAULT_SIZE("512K")
+ MCFG_RAM_EXTRA_OPTIONS("640K")
MACHINE_CONFIG_END
/*
@@ -564,18 +543,18 @@ Sinclair PC200 ROMs (from a v1.2 PC200):
V1.2:5EA8 V1.2:A058
*/
ROM_START( pc200 )
-// ROM_REGION(0x100000,"maincpu", 0)
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+// ROM_REGION(0x100000,"bios", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
// special bios at 0xe0000 !?
ROM_SYSTEM_BIOS(0, "v15", "v1.5")
- ROMX_LOAD("40185-2.ic129", 0xfc001, 0x2000, CRC(41302eb8) SHA1(8b4b2afea543b96b45d6a30365281decc15f2932), ROM_SKIP(1) | ROM_BIOS(1)) // v2
- ROMX_LOAD("40184-2.ic132", 0xfc000, 0x2000, CRC(71b84616) SHA1(4135102a491b25fc659d70b957e07649f3eacf24), ROM_SKIP(1) | ROM_BIOS(1)) // v2
+ ROMX_LOAD("40185-2.ic129", 0xc001, 0x2000, CRC(41302eb8) SHA1(8b4b2afea543b96b45d6a30365281decc15f2932), ROM_SKIP(1) | ROM_BIOS(1)) // v2
+ ROMX_LOAD("40184-2.ic132", 0xc000, 0x2000, CRC(71b84616) SHA1(4135102a491b25fc659d70b957e07649f3eacf24), ROM_SKIP(1) | ROM_BIOS(1)) // v2
ROM_SYSTEM_BIOS(1, "v13", "v1.3")
- ROMX_LOAD("40185v13.ic129", 0xfc001, 0x2000, CRC(f082f08e) SHA1(b332db419033588a7380bfecdf46104974347341), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD("40184v13.ic132", 0xfc000, 0x2000, CRC(5daf6068) SHA1(93a2ccfb0e29c8f2c98f06c64bb0ea0b3acafb13), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD("40185v13.ic129", 0xc001, 0x2000, CRC(f082f08e) SHA1(b332db419033588a7380bfecdf46104974347341), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD("40184v13.ic132", 0xc000, 0x2000, CRC(5daf6068) SHA1(93a2ccfb0e29c8f2c98f06c64bb0ea0b3acafb13), ROM_SKIP(1) | ROM_BIOS(2))
ROM_SYSTEM_BIOS(2, "v12", "v1.2")
- ROMX_LOAD("40185.ic129", 0xfc001, 0x2000, CRC(c2b4eeac) SHA1(f11015fadf0c16d86ce2c5047be3e6a4782044f7), ROM_SKIP(1) | ROM_BIOS(3))
- ROMX_LOAD("40184.ic132", 0xfc000, 0x2000, CRC(b22704a6) SHA1(dadd573db6cd34f339f2f0ae55b07537924c024a), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD("40185.ic129", 0xc001, 0x2000, CRC(c2b4eeac) SHA1(f11015fadf0c16d86ce2c5047be3e6a4782044f7), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD("40184.ic132", 0xc000, 0x2000, CRC(b22704a6) SHA1(dadd573db6cd34f339f2f0ae55b07537924c024a), ROM_SKIP(1) | ROM_BIOS(3))
// also mapped to f0000, f4000, f8000
ROM_REGION( 0x800, "keyboard", 0 )
ROM_LOAD( "40112.ic801", 0x000, 0x800, CRC(842a954c) SHA1(93ca6badf20e0215025fe109959eddead8c52f38) )
@@ -583,25 +562,25 @@ ROM_END
ROM_START( pc20 )
-// ROM_REGION(0x100000,"maincpu", 0)
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+// ROM_REGION(0x100000,"bios", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
// special bios at 0xe0000 !?
// This is probably referring to a check for the Amstrad RP5-2 diagnostic
// card, which can be plugged into an Amstrad XT for troubleshooting purposes.
// - John Elliott
- ROM_LOAD16_BYTE("pc20v2.0", 0xfc001, 0x2000, CRC(41302eb8) SHA1(8b4b2afea543b96b45d6a30365281decc15f2932)) // v2
- ROM_LOAD16_BYTE("pc20v2.1", 0xfc000, 0x2000, CRC(71b84616) SHA1(4135102a491b25fc659d70b957e07649f3eacf24)) // v2
+ ROM_LOAD16_BYTE("pc20v2.0", 0xc001, 0x2000, CRC(41302eb8) SHA1(8b4b2afea543b96b45d6a30365281decc15f2932)) // v2
+ ROM_LOAD16_BYTE("pc20v2.1", 0xc000, 0x2000, CRC(71b84616) SHA1(4135102a491b25fc659d70b957e07649f3eacf24)) // v2
// also mapped to f0000, f4000, f8000
ROM_END
ROM_START( ppc512 )
-// ROM_REGION(0x100000,"maincpu", 0)
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+// ROM_REGION(0x100000,"bios", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
// special bios at 0xe0000 !?
- ROM_LOAD16_BYTE("40107.v1", 0xfc000, 0x2000, CRC(4e37e769) SHA1(88be3d3375ec3b0a7041dbcea225b197e50d4bfe)) // v1.9
- ROM_LOAD16_BYTE("40108.v1", 0xfc001, 0x2000, CRC(4f0302d9) SHA1(e4d69ca98c3b98f3705a2902b16746360043f039)) // v1.9
+ ROM_LOAD16_BYTE("40107.v1", 0xc000, 0x2000, CRC(4e37e769) SHA1(88be3d3375ec3b0a7041dbcea225b197e50d4bfe)) // v1.9
+ ROM_LOAD16_BYTE("40108.v1", 0xc001, 0x2000, CRC(4f0302d9) SHA1(e4d69ca98c3b98f3705a2902b16746360043f039)) // v1.9
// also mapped to f0000, f4000, f8000
ROM_REGION( 0x800, "keyboard", 0 ) // PPC512 / PPC640 / PC200 102-key keyboard
ROM_LOAD( "40112.ic801", 0x000, 0x800, CRC(842a954c) SHA1(93ca6badf20e0215025fe109959eddead8c52f38) )
@@ -609,11 +588,11 @@ ROM_END
ROM_START( ppc640 )
-// ROM_REGION(0x100000,"maincpu", 0)
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+// ROM_REGION(0x100000,"bios", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
// special bios at 0xe0000 !?
- ROM_LOAD16_BYTE("40107.v2", 0xfc000, 0x2000, CRC(0785b63e) SHA1(4dbde6b9e9500298bb6241a8daefd85927f1ad28)) // v2.1
- ROM_LOAD16_BYTE("40108.v2", 0xfc001, 0x2000, CRC(5351cf8c) SHA1(b4dbf11b39378ab4afd2107d3fe54a99fffdedeb)) // v2.1
+ ROM_LOAD16_BYTE("40107.v2", 0xc000, 0x2000, CRC(0785b63e) SHA1(4dbde6b9e9500298bb6241a8daefd85927f1ad28)) // v2.1
+ ROM_LOAD16_BYTE("40108.v2", 0xc001, 0x2000, CRC(5351cf8c) SHA1(b4dbf11b39378ab4afd2107d3fe54a99fffdedeb)) // v2.1
// also mapped to f0000, f4000, f8000
ROM_REGION(0x2000,"subcpu", 0)
ROM_LOAD("40135.ic192", 0x00000, 0x2000, CRC(75d99199) SHA1(a76d39fda3d5140e1fb9ce70fcddbdfb8f891dc6))
@@ -624,10 +603,10 @@ ROM_END
ROM_START( pc2086 )
- ROM_REGION16_LE( 0x100000, "maincpu", 0 )
- ROM_LOAD( "40186.ic171", 0xc0000, 0x8000, CRC(959f00ba) SHA1(5df1efe4203cd076292a7713bd7ebd1196dca577) )
- ROM_LOAD16_BYTE( "40179.ic129", 0xfc000, 0x2000, CRC(003605e4) SHA1(b882e97ee81b9ba0e7d969c63da3f2052f23b4b9) )
- ROM_LOAD16_BYTE( "40180.ic132", 0xfc001, 0x2000, CRC(28ee5e58) SHA1(93e045609466fcec74e2bb72578bb7405281cf7b) )
+ ROM_REGION16_LE( 0x20000, "bios", 0 )
+ ROM_LOAD( "40186.ic171", 0x00000, 0x8000, CRC(959f00ba) SHA1(5df1efe4203cd076292a7713bd7ebd1196dca577) )
+ ROM_LOAD16_BYTE( "40179.ic129", 0x1c000, 0x2000, CRC(003605e4) SHA1(b882e97ee81b9ba0e7d969c63da3f2052f23b4b9) )
+ ROM_LOAD16_BYTE( "40180.ic132", 0x1c001, 0x2000, CRC(28ee5e58) SHA1(93e045609466fcec74e2bb72578bb7405281cf7b) )
ROM_REGION( 0x800, "keyboard", 0 ) // PC2086 / PC3086 102-key keyboard
ROM_LOAD( "40178.ic801", 0x000, 0x800, CRC(f72f1c2e) SHA1(34897e78b3d10f96b36d81778e97c4a9a1b8618b) )
@@ -635,10 +614,10 @@ ROM_END
ROM_START( pc3086 )
- ROM_REGION16_LE( 0x100000, "maincpu", 0 )
- ROM_LOAD( "c000.bin", 0xc0000, 0x8000, CRC(5a6c38e9) SHA1(382d2028e0dc5515a68843829563ce29018edb08) )
- ROM_LOAD( "c800.bin", 0xc8000, 0x2000, CRC(3329c6d5) SHA1(982e852278185d69acde47a4f3942bc09ed76777) )
- ROM_LOAD( "fc00.bin", 0xfc000, 0x4000, CRC(b5630753) SHA1(98c344831cc4dc59ebb39bbb1961964a8d39fe20) )
+ ROM_REGION16_LE( 0x20000, "bios", 0 )
+ ROM_LOAD( "c000.bin", 0x00000, 0x8000, CRC(5a6c38e9) SHA1(382d2028e0dc5515a68843829563ce29018edb08) )
+ ROM_LOAD( "c800.bin", 0x08000, 0x2000, CRC(3329c6d5) SHA1(982e852278185d69acde47a4f3942bc09ed76777) )
+ ROM_LOAD( "fc00.bin", 0x1c000, 0x4000, CRC(b5630753) SHA1(98c344831cc4dc59ebb39bbb1961964a8d39fe20) )
ROM_REGION( 0x800, "keyboard", 0 ) // PC2086 / PC3086 102-key keyboard
ROM_LOAD( "40178.ic801", 0x000, 0x800, CRC(f72f1c2e) SHA1(34897e78b3d10f96b36d81778e97c4a9a1b8618b) )
@@ -655,5 +634,5 @@ COMP( 1987, ppc512, ibm5150, 0, ppc512, pc200, driver_device,
COMP( 1987, ppc640, ibm5150, 0, ppc640, pc200, driver_device, 0, "Amstrad plc", "Amstrad PPC640", MACHINE_NOT_WORKING)
COMP( 1988, pc20, ibm5150, 0, pc200, pc200, driver_device, 0, "Amstrad plc", "Amstrad PC20" , MACHINE_NOT_WORKING)
COMP( 1988, pc200, ibm5150, 0, pc200, pc200, driver_device, 0, "Sinclair Research Ltd", "PC200 Professional Series", MACHINE_NOT_WORKING)
-COMP( 1988, pc2086, ibm5150, 0, pc200, pc200, driver_device, 0, "Amstrad plc", "Amstrad PC2086", MACHINE_NOT_WORKING )
-COMP( 1990, pc3086, ibm5150, 0, pc200, pc200, driver_device, 0, "Amstrad plc", "Amstrad PC3086", MACHINE_NOT_WORKING )
+COMP( 1988, pc2086, ibm5150, 0, pc2086, pc200, driver_device, 0, "Amstrad plc", "Amstrad PC2086", MACHINE_NOT_WORKING )
+COMP( 1990, pc3086, ibm5150, 0, pc2086, pc200, driver_device, 0, "Amstrad plc", "Amstrad PC3086", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/argox.cpp b/src/mame/drivers/argox.cpp
index 3ee71615d5c..aa52674a1f3 100644
--- a/src/mame/drivers/argox.cpp
+++ b/src/mame/drivers/argox.cpp
@@ -1,4 +1,4 @@
-// license:GPL2+
+// license:GPL-2.0+
// copyright-holders:Felipe Sanches
/***************************************************************************
diff --git a/src/mame/drivers/asst128.cpp b/src/mame/drivers/asst128.cpp
index 7ee9e464a66..1f246a3fec5 100644
--- a/src/mame/drivers/asst128.cpp
+++ b/src/mame/drivers/asst128.cpp
@@ -2,12 +2,9 @@
// copyright-holders:Sergey Svishchev
#include "emu.h"
#include "includes/genpc.h"
+#include "bus/pc_kbd/keyboards.h"
#include "machine/pc_fdc.h"
-#include "cpu/i86/i86.h"
-#include "bus/isa/isa.h"
-#include "bus/isa/isa_cards.h"
#include "formats/asst128_dsk.h"
-#include "bus/pc_kbd/keyboards.h"
class asst128_mb_device : public ibm5150_mb_device
{
@@ -16,22 +13,16 @@ public:
asst128_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: ibm5150_mb_device(mconfig, tag, owner, clock) { }
-protected:
- // device-level overrides
- void device_start() override;
+ DECLARE_ADDRESS_MAP(map, 8);
};
-void asst128_mb_device::device_start()
-{
- install_device(0x0020, 0x0021, 0, 0, read8_delegate(FUNC(pic8259_device::read), (pic8259_device*)m_pic8259), write8_delegate(FUNC(pic8259_device::write), (pic8259_device*)m_pic8259) );
- install_device(0x0040, 0x0043, 0, 0, read8_delegate(FUNC(pit8253_device::read), (pit8253_device*)m_pit8253), write8_delegate(FUNC(pit8253_device::write), (pit8253_device*)m_pit8253) );
- install_device(0x0060, 0x0063, 0, 0, read8_delegate(FUNC(i8255_device::read), (i8255_device*)m_ppi8255), write8_delegate(FUNC(i8255_device::write), (i8255_device*)m_ppi8255) );
- install_device(0x0080, 0x0087, 0, 0, read8_delegate(FUNC(ibm5160_mb_device::pc_page_r), this), write8_delegate(FUNC(ibm5160_mb_device::pc_page_w),this) );
- install_device(0x00a0, 0x00a1, 0, 0, read8_delegate(), write8_delegate(FUNC(ibm5160_mb_device::nmi_enable_w),this));
- /* MESS managed RAM */
- if ( m_ram->pointer() )
- membank( "bank10" )->set_base( m_ram->pointer() );
-}
+DEVICE_ADDRESS_MAP_START( map, 8, asst128_mb_device )
+ AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write)
+ AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write)
+ AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
+ AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w)
+ AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w)
+ADDRESS_MAP_END
const device_type ASST128_MOTHERBOARD = &device_creator<asst128_mb_device>;
@@ -42,12 +33,10 @@ public:
asst128_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
- , m_mb(*this, "mb")
, m_fdc(*this, "fdc")
{ }
- required_device<cpu_device> m_maincpu;
- required_device<asst128_mb_device> m_mb;
+ required_device<cpu_device> m_maincpu;
required_device<pc_fdc_xt_device> m_fdc;
DECLARE_FLOPPY_FORMATS( asst128_formats );
@@ -59,8 +48,8 @@ public:
void asst128_state::machine_start()
{
memory_region* font = memregion(":board0:cga_mc1502:gfx1");
- memcpy(font->base(), memregion("maincpu")->base()+0xffa6e, 0x0400);
- memcpy(font->base()+0x0400, memregion("maincpu")->base()+0xf4000, 0x0400);
+ memcpy(font->base(), memregion("bios")->base()+0xfa6e, 0x0400);
+ memcpy(font->base()+0x0400, memregion("bios")->base()+0x4000, 0x0400);
}
WRITE8_MEMBER(asst128_state::asst128_fdc_dor_w)
@@ -71,16 +60,12 @@ WRITE8_MEMBER(asst128_state::asst128_fdc_dor_w)
static ADDRESS_MAP_START( asst128_map, AS_PROGRAM, 16, asst128_state)
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x7ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(asst128_io, AS_IO, 16, asst128_state)
ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", asst128_mb_device, map, 0xffff)
AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
AM_RANGE(0x03f2, 0x03f3) AM_WRITE8(asst128_fdc_dor_w, 0xffff)
AM_RANGE(0x03f4, 0x03f5) AM_DEVICE8("fdc:upd765", upd765a_device, map, 0xffff)
@@ -108,10 +93,7 @@ static MACHINE_CONFIG_START( asst128, asst128_state )
asst128_mb_device::static_set_cputag(*device, "maincpu");
MCFG_DEVICE_INPUT_DEFAULTS(asst128)
-// MCFG_DEVICE_REMOVE("mb:dma8237")
-
- MCFG_DEVICE_REMOVE("mb:cassette")
- MCFG_CASSETTE_ADD("mb:cassette")
+ MCFG_DEVICE_MODIFY("mb:cassette")
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
MCFG_ISA8_SLOT_ADD("mb:isa", "board0", pc_isa8_cards, "cga_mc1502", true)
@@ -127,14 +109,15 @@ static MACHINE_CONFIG_START( asst128, asst128_state )
MCFG_PC_JOY_ADD("pc_joy")
MCFG_RAM_ADD(RAM_TAG)
- MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_DEFAULT_SIZE("512K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K")
MACHINE_CONFIG_END
ROM_START( asst128 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
- ROM_LOAD( "extbios.bin", 0xf4000, 0x2000, CRC(e3bf22de) SHA1(d4319edc82c0015ca0adc6c8771e887659717e62))
- ROM_LOAD( "basic.bin", 0xf6000, 0x8000, CRC(a4ec66f6) SHA1(80e934986022681ccde180e92aa108e716c4f19b))
- ROM_LOAD( "mainbios.bin", 0xfe000, 0x2000, CRC(8426cbf5) SHA1(41d14137ffa651977041da22aa8071c0f7854158))
+ ROM_REGION16_LE(0x10000,"bios", 0)
+ ROM_LOAD( "extbios.bin", 0x4000, 0x2000, CRC(e3bf22de) SHA1(d4319edc82c0015ca0adc6c8771e887659717e62))
+ ROM_LOAD( "basic.bin", 0x6000, 0x8000, CRC(a4ec66f6) SHA1(80e934986022681ccde180e92aa108e716c4f19b))
+ ROM_LOAD( "mainbios.bin", 0xe000, 0x2000, CRC(8426cbf5) SHA1(41d14137ffa651977041da22aa8071c0f7854158))
// XXX needs dumping
ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00)
diff --git a/src/mame/drivers/badlands.cpp b/src/mame/drivers/badlands.cpp
index e8157cedee2..f0443dac434 100644
--- a/src/mame/drivers/badlands.cpp
+++ b/src/mame/drivers/badlands.cpp
@@ -217,7 +217,7 @@ MACHINE_RESET_MEMBER(badlands_state,badlands)
atarigen_state::machine_reset();
scanline_timer_reset(*m_screen, 32);
- memcpy(m_bank_base, &m_bank_source_data[0x0000], 0x1000);
+ membank("soundbank")->set_entry(0);
}
@@ -359,7 +359,7 @@ WRITE8_MEMBER(badlands_state::audio_io_w)
*/
/* update the bank */
- memcpy(m_bank_base, &m_bank_source_data[0x1000 * ((data >> 6) & 3)], 0x1000);
+ membank("soundbank")->set_entry((data >> 6) & 3);
break;
}
}
@@ -405,7 +405,8 @@ static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, badlands_state )
AM_RANGE(0x0000, 0x1fff) AM_RAM
AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0x2800, 0x2bff) AM_READWRITE(audio_io_r, audio_io_w)
- AM_RANGE(0x3000, 0xffff) AM_ROM
+ AM_RANGE(0x3000, 0x3fff) AM_ROMBANK("soundbank")
+ AM_RANGE(0x4000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -552,9 +553,8 @@ ROM_START( badlands )
ROM_LOAD16_BYTE( "136074-1009.17f", 0x20000, 0x10000, CRC(0e2e807f) SHA1(5b61de066dca12c44335aa68a13c821845657866) )
ROM_LOAD16_BYTE( "136074-1007.24f", 0x20001, 0x10000, CRC(99a20c2c) SHA1(9b0a5a5dafb8816e72330d302c60339b600b49a8) )
- ROM_REGION( 0x14000, "audiocpu", 0 ) /* 64k for 6502 code */
- ROM_LOAD( "136074-1018.9c", 0x10000, 0x4000, CRC(a05fd146) SHA1(d97abbcf7897ca720cc18ff3a323f41cd3b23c34) )
- ROM_CONTINUE( 0x04000, 0xc000 )
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
+ ROM_LOAD( "136074-1018.9c", 0x00000, 0x10000, CRC(a05fd146) SHA1(d97abbcf7897ca720cc18ff3a323f41cd3b23c34) )
ROM_REGION( 0x60000, "gfx1", ROMREGION_INVERT )
ROM_LOAD( "136074-1012.4n", 0x000000, 0x10000, CRC(5d124c6c) SHA1(afebaaf90b3751f5e873fc4c45f1d5385ef86a6e) ) /* playfield */
@@ -589,8 +589,7 @@ ROM_END
DRIVER_INIT_MEMBER(badlands_state,badlands)
{
/* initialize the audio system */
- m_bank_base = &memregion("audiocpu")->base()[0x03000];
- m_bank_source_data = &memregion("audiocpu")->base()[0x10000];
+ membank("soundbank")->configure_entries(0, 4, memregion("audiocpu")->base(), 0x01000);
}
@@ -601,7 +600,7 @@ DRIVER_INIT_MEMBER(badlands_state,badlands)
*
*************************************/
-GAME( 1989, badlands, 0, badlands, badlands, badlands_state, badlands, ROT0, "Atari Games", "Bad Lands", 0 )
+GAME( 1989, badlands, 0, badlands, badlands, badlands_state, badlands, ROT0, "Atari Games", "Bad Lands", MACHINE_SUPPORTS_SAVE )
/* Badlands - Playmark Bootleg support - split this into its own file?
diff --git a/src/mame/drivers/bking.cpp b/src/mame/drivers/bking.cpp
index 9b1dcc9a100..6d25f92bba9 100644
--- a/src/mame/drivers/bking.cpp
+++ b/src/mame/drivers/bking.cpp
@@ -1,5 +1,5 @@
-// license:???
-// copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari
+// license:BSD-3-Clause
+// copyright-holders:Mike Balfour, Zsolt Vasvari
/***************************************************************************
diff --git a/src/mame/drivers/canon_s80.cpp b/src/mame/drivers/canon_s80.cpp
index 2ee2325ce0e..307c8d69dd0 100644
--- a/src/mame/drivers/canon_s80.cpp
+++ b/src/mame/drivers/canon_s80.cpp
@@ -1,4 +1,4 @@
-// license:GPL2+
+// license:GPL-2.0+
// copyright-holders:FelipeSanches
/*
* canon_s80.c
diff --git a/src/mame/drivers/carjmbre.cpp b/src/mame/drivers/carjmbre.cpp
index 3c387d19531..e32fc2b77de 100644
--- a/src/mame/drivers/carjmbre.cpp
+++ b/src/mame/drivers/carjmbre.cpp
@@ -1,5 +1,8 @@
-// license:???
-// copyright-holders:insideoutboy, Nicola Salmoria
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+// **** SKELETON DRIVER **** original removed due to unresolved licensing.
+
/***************************************************************************
Car Jamboree
@@ -28,216 +31,25 @@
8910 SW
8910
-Notes:
-
-- some sprite glitches from sprite number/colour changes happening on
- different frames, possibly original behaviour. eg cars changing colour
- just before exploding, animals displaying as the wrong sprite for one
- frame when entering the arena
-
-- colours look wrong, maybe address bitswap?
-
-- background colour calculation is a guess
-
***************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
-#include "sound/ay8910.h"
-#include "includes/carjmbre.h"
-
-/*************************************
- *
- * Memory maps
- *
- *************************************/
-WRITE8_MEMBER(carjmbre_state::nmi_mask_w)
+class carjmbre_state : public driver_device
{
- m_nmi_mask = data & 1;
-}
-
-
-static ADDRESS_MAP_START( carjmbre_map, AS_PROGRAM, 8, carjmbre_state )
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0x87ff) AM_RAM
-// AM_RANGE(0x8800, 0x8800) AM_READNOP // watchdog?
- AM_RANGE(0x8803, 0x8803) AM_WRITE(nmi_mask_w)
- AM_RANGE(0x8805, 0x8805) AM_WRITE(carjmbre_bgcolor_w) // guessed
- AM_RANGE(0x8806, 0x8806) AM_WRITE(carjmbre_8806_w) // video related?
- AM_RANGE(0x8807, 0x8807) AM_WRITE(carjmbre_flipscreen_w)
-// AM_RANGE(0x8fc1, 0x8fc1) AM_WRITENOP // overrun during initial screen clear
-// AM_RANGE(0x8fe1, 0x8fe1) AM_WRITENOP // overrun during initial screen clear
- AM_RANGE(0x9000, 0x97ff) AM_RAM_WRITE(carjmbre_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0x9800, 0x985f) AM_MIRROR(0x80) AM_WRITEONLY AM_SHARE("spriteram")
- AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1")
- AM_RANGE(0xa800, 0xa800) AM_READ_PORT("P2")
- AM_RANGE(0xb800, 0xb800) AM_READ_PORT("DSW") AM_WRITE(soundlatch_byte_w)
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( carjmbre_sound_map, AS_PROGRAM, 8, carjmbre_state )
- AM_RANGE(0x0000, 0x0fff) AM_MIRROR(0x1000) AM_ROM
- AM_RANGE(0x2000, 0x27ff) AM_RAM
-ADDRESS_MAP_END
-
-
-static ADDRESS_MAP_START( carjmbre_sound_io_map, AS_IO, 8, carjmbre_state )
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r)
- AM_RANGE(0x10, 0x10) AM_WRITENOP //?? written on init/0xff sound command reset
- AM_RANGE(0x20, 0x21) AM_DEVWRITE("ay1", ay8910_device, address_data_w)
- AM_RANGE(0x22, 0x22) AM_WRITENOP //?? written before and after 0x21 with same value
- AM_RANGE(0x24, 0x24) AM_READNOP //??
- AM_RANGE(0x30, 0x31) AM_DEVWRITE("ay2", ay8910_device, address_data_w)
- AM_RANGE(0x32, 0x32) AM_WRITENOP //?? written before and after 0x31 with same value
-ADDRESS_MAP_END
+public:
+ carjmbre_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ {}
+};
-/*************************************
- *
- * Input ports
- *
- *************************************/
static INPUT_PORTS_START( carjmbre )
- PORT_START("P1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) //coin error if held high for 1s
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) //or if many coins inserted quickly
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
-
- PORT_START("P2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
-
- PORT_START("DSW")
- PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
- PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x03, DEF_STR( Free_Play ) )
- PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3")
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x04, DEF_STR( 1C_6C ) )
- PORT_DIPNAME( 0x18, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:4,5")
- PORT_DIPSETTING( 0x00, "3" )
- PORT_DIPSETTING( 0x08, "4" )
- PORT_DIPSETTING( 0x10, "5" )
- PORT_DIPSETTING( 0x18, "Free") // 250 (cheat)
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:6")
- PORT_DIPSETTING( 0x00, "10k, then every 100k" )
- PORT_DIPSETTING( 0x20, "20k, then every 100k" )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:7")
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8")
- PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
INPUT_PORTS_END
-/*************************************
- *
- * Graphics definitions
- *
- *************************************/
-
-static const gfx_layout carjmbre_charlayout =
-{
- 8,8,
- RGN_FRAC(2,4),
- 2,
- { RGN_FRAC(0,4), RGN_FRAC(2,4) },
- { STEP8(0,1) },
- { STEP8(0,8) },
- 8*8
-};
-
-static const gfx_layout carjmbre_spritelayout =
-{
- 16,16,
- RGN_FRAC(1,4),
- 2,
- { RGN_FRAC(2,4), RGN_FRAC(0,4) },
- { STEP8(0,1), STEP8(256*16*8,1) },
- { STEP16(0,8) },
- 16*8
-};
-
-static GFXDECODE_START( carjmbre )
- GFXDECODE_ENTRY( "gfx1", 0, carjmbre_charlayout, 0, 16 )
- GFXDECODE_ENTRY( "gfx2", 0, carjmbre_spritelayout, 0, 16 )
-GFXDECODE_END
-
-
-/*************************************
- *
- * Machine driver
- *
- *************************************/
-
-void carjmbre_state::machine_reset()
-{
- m_flipscreen = 0;
- m_bgcolor = 0;
-}
-
-INTERRUPT_GEN_MEMBER(carjmbre_state::vblank_irq)
-{
- if(m_nmi_mask)
- device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
-}
-
static MACHINE_CONFIG_START( carjmbre, carjmbre_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6)
- MCFG_CPU_PROGRAM_MAP(carjmbre_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", carjmbre_state, vblank_irq)
-
-
- MCFG_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6/2)
- MCFG_CPU_PROGRAM_MAP(carjmbre_sound_map)
- MCFG_CPU_IO_MAP(carjmbre_sound_io_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", carjmbre_state, irq0_line_hold)
-
- /* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(carjmbre_state, screen_update_carjmbre)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", carjmbre)
- MCFG_PALETTE_ADD("palette", 64)
- MCFG_PALETTE_INIT_OWNER(carjmbre_state, carjmbre)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/6/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.12)
-
- MCFG_SOUND_ADD("ay2", AY8910, XTAL_18_432MHz/6/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.12)
MACHINE_CONFIG_END
-/*************************************
- *
- * ROM definition
- *
- *************************************/
-
ROM_START( carjmbre )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "c1", 0x0000, 0x1000, CRC(62b21739) SHA1(710e5c52f27603aa8f864f6f28d7272f21271d60) )
@@ -267,10 +79,4 @@ ROM_START( carjmbre )
ROM_LOAD( "c.d18", 0x0020, 0x0020, CRC(7b9ed1b0) SHA1(ec5e1f56e5a2fc726083866c08ac0e1de0ed6ace) )
ROM_END
-/*************************************
- *
- * Game driver
- *
- *************************************/
-
-GAME( 1983, carjmbre, 0, carjmbre, carjmbre, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Car Jamboree", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE )
+GAME( 1983, carjmbre, 0, carjmbre, carjmbre, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Car Jamboree", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/dai3wksi.cpp b/src/mame/drivers/dai3wksi.cpp
index 08bfc4febc7..879163b3fb9 100644
--- a/src/mame/drivers/dai3wksi.cpp
+++ b/src/mame/drivers/dai3wksi.cpp
@@ -1,4 +1,4 @@
-// license:???
+// license:BSD-3-Clause
// copyright-holders:Hau,Derrick Renaud
/*
diff --git a/src/mame/drivers/dvk_kcgd.cpp b/src/mame/drivers/dvk_kcgd.cpp
index 6ddebb26b09..c13774fd3ce 100644
--- a/src/mame/drivers/dvk_kcgd.cpp
+++ b/src/mame/drivers/dvk_kcgd.cpp
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Sergey Svishchev
/***************************************************************************
KCGD (Kontroller Cvetnogo Graficheskogo Displeya = Colour Graphics
diff --git a/src/mame/drivers/ec184x.cpp b/src/mame/drivers/ec184x.cpp
index e0a1ed23348..bbad68d0c37 100644
--- a/src/mame/drivers/ec184x.cpp
+++ b/src/mame/drivers/ec184x.cpp
@@ -168,63 +168,37 @@ MACHINE_RESET_MEMBER( ec184x_state, ec1841 )
static ADDRESS_MAP_START( ec1840_map, AS_PROGRAM, 8, ec184x_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x7ffff) AM_RAM
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xdc000, 0xdffff) AM_RAM
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START( ec1841_map, AS_PROGRAM, 16, ec184x_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x7ffff) AM_RAM
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START( ec1847_map, AS_PROGRAM, 8, ec184x_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xdc000, 0xdffff) AM_RAM
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xe0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START( ec1840_io, AS_IO, 8, ec184x_state )
ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", ibm5150_mb_device, map)
ADDRESS_MAP_END
static ADDRESS_MAP_START( ec1841_io, AS_IO, 16, ec184x_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x02b0, 0x02b3) AM_READWRITE8(memboard_r, memboard_w, 0xffff);
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ec1841_mb_device, map, 0xffff)
+ AM_RANGE(0x02b0, 0x02b3) AM_READWRITE8(memboard_r, memboard_w, 0xffff)
ADDRESS_MAP_END
static ADDRESS_MAP_START( ec1847_io, AS_IO, 8, ec184x_state )
ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", ibm5160_mb_device, map)
// AM_RANGE(0x0210, 0x021f) AM_RAM // internal (non-standard?) bus extender
ADDRESS_MAP_END
-static INPUT_PORTS_START( ec1841 )
-INPUT_PORTS_END
-
-static DEVICE_INPUT_DEFAULTS_START( ec1840 )
- DEVICE_INPUT_DEFAULTS("DSW0", 0x31, 0x21)
-DEVICE_INPUT_DEFAULTS_END
-
-static DEVICE_INPUT_DEFAULTS_START( ec1841 )
- DEVICE_INPUT_DEFAULTS("DSW0", 0x31, 0x21)
-DEVICE_INPUT_DEFAULTS_END
-
-static DEVICE_INPUT_DEFAULTS_START( ec1847 )
- DEVICE_INPUT_DEFAULTS("DSW0", 0x31, 0x31)
-DEVICE_INPUT_DEFAULTS_END
-
// XXX verify everything
static MACHINE_CONFIG_START( ec1840, ec184x_state )
MCFG_CPU_ADD("maincpu", I8088, 4096000)
@@ -233,7 +207,6 @@ static MACHINE_CONFIG_START( ec1840, ec184x_state )
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
MCFG_IBM5150_MOTHERBOARD_ADD("mb","maincpu")
- MCFG_DEVICE_INPUT_DEFAULTS(ec1840)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1840.0002", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false) // actually ec1840.0003 -- w/o mouse port
@@ -259,7 +232,6 @@ static MACHINE_CONFIG_START( ec1841, ec184x_state )
MCFG_MACHINE_RESET_OVERRIDE(ec184x_state, ec1841)
MCFG_EC1841_MOTHERBOARD_ADD("mb", "maincpu")
- MCFG_DEVICE_INPUT_DEFAULTS(ec1841)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1841.0002", false) // cga
MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false) // fdc + mouse port
@@ -285,7 +257,6 @@ static MACHINE_CONFIG_START( ec1847, ec184x_state )
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu")
- MCFG_DEVICE_INPUT_DEFAULTS(ec1847)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "hercules", false) // cga, ega and vga(?) are options too
MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false)
@@ -301,83 +272,83 @@ static MACHINE_CONFIG_START( ec1847, ec184x_state )
MACHINE_CONFIG_END
ROM_START( ec1840 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
ROM_DEFAULT_BIOS("v4")
// supports MDA only
ROM_SYSTEM_BIOS(0, "v1", "EC-1840.01")
- ROMX_LOAD( "000-01.bin", 0xfe000, 0x0800, CRC(c3ab1fad) SHA1(8168bdee30698f4f9aa7bbb6dfabe62dd723cec5), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "001-01.bin", 0xff000, 0x0800, CRC(601d1155) SHA1(9684d33b92743749704587a48e679ef7a3b20f9c), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "002-01.bin", 0xfe001, 0x0800, CRC(ce4dddb7) SHA1(f9b1da60c848e68ff1c154d695a36a0833de4804), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "003-01.bin", 0xff001, 0x0800, CRC(14b40431) SHA1(ce7fffa41897405ee64fd4e86015e774f8bd108a), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "000-01.bin", 0xe000, 0x0800, CRC(c3ab1fad) SHA1(8168bdee30698f4f9aa7bbb6dfabe62dd723cec5), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "001-01.bin", 0xf000, 0x0800, CRC(601d1155) SHA1(9684d33b92743749704587a48e679ef7a3b20f9c), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "002-01.bin", 0xe001, 0x0800, CRC(ce4dddb7) SHA1(f9b1da60c848e68ff1c154d695a36a0833de4804), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "003-01.bin", 0xf001, 0x0800, CRC(14b40431) SHA1(ce7fffa41897405ee64fd4e86015e774f8bd108a), ROM_SKIP(1) | ROM_BIOS(1))
ROM_SYSTEM_BIOS(1, "v4", "EC-1840.04")
- ROMX_LOAD( "000-04-971b.bin", 0xfe000, 0x0800, CRC(06aeaee8) SHA1(9f954e4c48156d573a8e0109e7ca652be9e6036a), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "001-04-92b7.bin", 0xff000, 0x0800, CRC(3fae650a) SHA1(c98b777fdeceadd72d6eb9465b3501b9ead55a08), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "002-04-9e17.bin", 0xfe001, 0x0800, CRC(d59712df) SHA1(02ea1b3ae9662f5c64c58920a32ca9db0f6fbd12), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "003-04-3ccb.bin", 0xff001, 0x0800, CRC(7fc362c7) SHA1(538e13639ad2b4c30bd72582e323181e63513306), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "000-04-971b.bin", 0xe000, 0x0800, CRC(06aeaee8) SHA1(9f954e4c48156d573a8e0109e7ca652be9e6036a), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "001-04-92b7.bin", 0xf000, 0x0800, CRC(3fae650a) SHA1(c98b777fdeceadd72d6eb9465b3501b9ead55a08), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "002-04-9e17.bin", 0xe001, 0x0800, CRC(d59712df) SHA1(02ea1b3ae9662f5c64c58920a32ca9db0f6fbd12), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "003-04-3ccb.bin", 0xf001, 0x0800, CRC(7fc362c7) SHA1(538e13639ad2b4c30bd72582e323181e63513306), ROM_SKIP(1) | ROM_BIOS(2))
ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00)
ROM_END
ROM_START( ec1841 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
ROM_DEFAULT_BIOS("v2")
ROM_SYSTEM_BIOS(0, "v1", "EC-1841.01")
- ROMX_LOAD( "012-01-3107.bin", 0xfc000, 0x0800, CRC(77957396) SHA1(785f1dceb6e2b4618f5c5f0af15eb74a8c951448), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "013-01-203f.bin", 0xfc001, 0x0800, CRC(768bd3d5) SHA1(2e948f2ad262de306d889b7964c3f1aad45ff5bc), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "014-01-fa40.bin", 0xfd000, 0x0800, CRC(47722b58) SHA1(a6339ee8af516f834826b7828a5cf79cb650480c), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "015-01-bf1d.bin", 0xfd001, 0x0800, CRC(b585b5ea) SHA1(d0ebed586eb13031477c2e071c50416682f80489), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "016-01-65f7.bin", 0xfe000, 0x0800, CRC(28a07db4) SHA1(17fbcd60dacd1d3f8d8355db429f97e4d1d1ac88), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "017-01-5be1.bin", 0xfe001, 0x0800, CRC(928bda26) SHA1(ee889184067e2680b29a8ef1c3a76cf5afd4c78d), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "018-01-7090.bin", 0xff000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "019-01-0492.bin", 0xff001, 0x0800, CRC(8a9d593e) SHA1(f3936d2cb4e6d130dd732973f126c3aa20612463), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "012-01-3107.bin", 0xc000, 0x0800, CRC(77957396) SHA1(785f1dceb6e2b4618f5c5f0af15eb74a8c951448), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "013-01-203f.bin", 0xc001, 0x0800, CRC(768bd3d5) SHA1(2e948f2ad262de306d889b7964c3f1aad45ff5bc), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "014-01-fa40.bin", 0xd000, 0x0800, CRC(47722b58) SHA1(a6339ee8af516f834826b7828a5cf79cb650480c), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "015-01-bf1d.bin", 0xd001, 0x0800, CRC(b585b5ea) SHA1(d0ebed586eb13031477c2e071c50416682f80489), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "016-01-65f7.bin", 0xe000, 0x0800, CRC(28a07db4) SHA1(17fbcd60dacd1d3f8d8355db429f97e4d1d1ac88), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "017-01-5be1.bin", 0xe001, 0x0800, CRC(928bda26) SHA1(ee889184067e2680b29a8ef1c3a76cf5afd4c78d), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "018-01-7090.bin", 0xf000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "019-01-0492.bin", 0xf001, 0x0800, CRC(8a9d593e) SHA1(f3936d2cb4e6d130dd732973f126c3aa20612463), ROM_SKIP(1) | ROM_BIOS(1))
ROM_SYSTEM_BIOS(1, "v2", "EC-1841.02")
- ROMX_LOAD( "012-02-37f6.bin", 0xfc000, 0x0800, CRC(8f5c6a20) SHA1(874b62f9cee8d3b974f33732f94eff10fc002c44), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "013-02-2552.bin", 0xfc001, 0x0800, CRC(e3c10128) SHA1(d6ed743ebe9c130925c9f17aad1a45db9194c967), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "014-02-0fbe.bin", 0xfd000, 0x0800, CRC(f8517e5e) SHA1(8034cd6ff5778365dc9daa494524f1753a74f1ed), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "015-02-d736.bin", 0xfd001, 0x0800, CRC(8538c52a) SHA1(ee981ce90870b6546a18f2a2e64d71b0038ce0dd), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "016-02-5b2c.bin", 0xfe000, 0x0800, CRC(3d1d1e67) SHA1(c527e29796537787c0f6c329f3c203f6131ca77f), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "017-02-4b9d.bin", 0xfe001, 0x0800, CRC(1b985264) SHA1(5ddcb9c13564be208c5068c105444a87159c67ee), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "018-02-7090.bin", 0xff000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "019-02-0493.bin", 0xff001, 0x0800, CRC(61aae23d) SHA1(7b3aa24a63ee31b194297eb1e61c3827edfcb95a), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "012-02-37f6.bin", 0xc000, 0x0800, CRC(8f5c6a20) SHA1(874b62f9cee8d3b974f33732f94eff10fc002c44), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "013-02-2552.bin", 0xc001, 0x0800, CRC(e3c10128) SHA1(d6ed743ebe9c130925c9f17aad1a45db9194c967), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "014-02-0fbe.bin", 0xd000, 0x0800, CRC(f8517e5e) SHA1(8034cd6ff5778365dc9daa494524f1753a74f1ed), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "015-02-d736.bin", 0xd001, 0x0800, CRC(8538c52a) SHA1(ee981ce90870b6546a18f2a2e64d71b0038ce0dd), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "016-02-5b2c.bin", 0xe000, 0x0800, CRC(3d1d1e67) SHA1(c527e29796537787c0f6c329f3c203f6131ca77f), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "017-02-4b9d.bin", 0xe001, 0x0800, CRC(1b985264) SHA1(5ddcb9c13564be208c5068c105444a87159c67ee), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "018-02-7090.bin", 0xf000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "019-02-0493.bin", 0xf001, 0x0800, CRC(61aae23d) SHA1(7b3aa24a63ee31b194297eb1e61c3827edfcb95a), ROM_SKIP(1) | ROM_BIOS(2))
ROM_SYSTEM_BIOS(2, "v3", "EC-1841.03")
- ROMX_LOAD( "012-03-37e7.bin", 0xfc000, 0x0800, CRC(49992bd5) SHA1(119121e1b4af1c44b9b8c2edabe7dc1d3019c4a6), ROM_SKIP(1) | ROM_BIOS(3))
- ROMX_LOAD( "013-03-2554.bin", 0xfc001, 0x0800, CRC(834bd7d7) SHA1(e37514fc4cb8a5cbe68e7564e0e07d5116c4021a), ROM_SKIP(1) | ROM_BIOS(3))
- ROMX_LOAD( "014-03-0fbe.bin", 0xfd000, 0x0800, CRC(f8517e5e) SHA1(8034cd6ff5778365dc9daa494524f1753a74f1ed), ROM_SKIP(1) | ROM_BIOS(3))
- ROMX_LOAD( "015-03-d736.bin", 0xfd001, 0x0800, CRC(8538c52a) SHA1(ee981ce90870b6546a18f2a2e64d71b0038ce0dd), ROM_SKIP(1) | ROM_BIOS(3))
- ROMX_LOAD( "016-03-5b2c.bin", 0xfe000, 0x0800, CRC(3d1d1e67) SHA1(c527e29796537787c0f6c329f3c203f6131ca77f), ROM_SKIP(1) | ROM_BIOS(3))
- ROMX_LOAD( "017-03-4b9d.bin", 0xfe001, 0x0800, CRC(1b985264) SHA1(5ddcb9c13564be208c5068c105444a87159c67ee), ROM_SKIP(1) | ROM_BIOS(3))
- ROMX_LOAD( "018-03-7090.bin", 0xff000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(3))
- ROMX_LOAD( "019-03-0493.bin", 0xff001, 0x0800, CRC(61aae23d) SHA1(7b3aa24a63ee31b194297eb1e61c3827edfcb95a), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD( "012-03-37e7.bin", 0xc000, 0x0800, CRC(49992bd5) SHA1(119121e1b4af1c44b9b8c2edabe7dc1d3019c4a6), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD( "013-03-2554.bin", 0xc001, 0x0800, CRC(834bd7d7) SHA1(e37514fc4cb8a5cbe68e7564e0e07d5116c4021a), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD( "014-03-0fbe.bin", 0xd000, 0x0800, CRC(f8517e5e) SHA1(8034cd6ff5778365dc9daa494524f1753a74f1ed), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD( "015-03-d736.bin", 0xd001, 0x0800, CRC(8538c52a) SHA1(ee981ce90870b6546a18f2a2e64d71b0038ce0dd), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD( "016-03-5b2c.bin", 0xe000, 0x0800, CRC(3d1d1e67) SHA1(c527e29796537787c0f6c329f3c203f6131ca77f), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD( "017-03-4b9d.bin", 0xe001, 0x0800, CRC(1b985264) SHA1(5ddcb9c13564be208c5068c105444a87159c67ee), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD( "018-03-7090.bin", 0xf000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD( "019-03-0493.bin", 0xf001, 0x0800, CRC(61aae23d) SHA1(7b3aa24a63ee31b194297eb1e61c3827edfcb95a), ROM_SKIP(1) | ROM_BIOS(3))
ROM_END
ROM_START( ec1845 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
- ROMX_LOAD( "184500.bin", 0xfc000, 0x0800, CRC(7c472ef7) SHA1(3af53f27b49bbc731bf51f9300fbada23a1bfcfc), ROM_SKIP(1))
- ROMX_LOAD( "184501.bin", 0xfc001, 0x0800, CRC(db240dc6) SHA1(d7bb022213d09bbf2a8107fe4f1cd27b23939e18), ROM_SKIP(1))
- ROMX_LOAD( "184502.bin", 0xfd000, 0x0800, CRC(149e7e29) SHA1(7f2a297588fef1bc750c57e6ae0d5acf3d27c486), ROM_SKIP(1))
- ROMX_LOAD( "184503.bin", 0xfd001, 0x0800, CRC(e28cbd74) SHA1(cf1fba4e67c8e1dd8cdda547118e84b704029b03), ROM_SKIP(1))
- ROMX_LOAD( "184504.bin", 0xfe000, 0x0800, CRC(55fa7a1d) SHA1(58f7abab08b9d2f0a1c1636e11bb72af2694c95f), ROM_SKIP(1))
- ROMX_LOAD( "184505.bin", 0xfe001, 0x0800, CRC(c807e3f5) SHA1(08117e449f0d04f96041cff8d34893f500f3760d), ROM_SKIP(1))
- ROMX_LOAD( "184506.bin", 0xff000, 0x0800, CRC(24f5c27c) SHA1(7822dd7f715ef00ccf6d8408be8bbfe01c2eba20), ROM_SKIP(1))
- ROMX_LOAD( "184507.bin", 0xff001, 0x0800, CRC(75122203) SHA1(7b0fbdf1315230633e39574ac7360163bc7361e1), ROM_SKIP(1))
+ ROM_REGION16_LE(0x10000,"bios", 0)
+ ROMX_LOAD( "184500.bin", 0xc000, 0x0800, CRC(7c472ef7) SHA1(3af53f27b49bbc731bf51f9300fbada23a1bfcfc), ROM_SKIP(1))
+ ROMX_LOAD( "184501.bin", 0xc001, 0x0800, CRC(db240dc6) SHA1(d7bb022213d09bbf2a8107fe4f1cd27b23939e18), ROM_SKIP(1))
+ ROMX_LOAD( "184502.bin", 0xd000, 0x0800, CRC(149e7e29) SHA1(7f2a297588fef1bc750c57e6ae0d5acf3d27c486), ROM_SKIP(1))
+ ROMX_LOAD( "184503.bin", 0xd001, 0x0800, CRC(e28cbd74) SHA1(cf1fba4e67c8e1dd8cdda547118e84b704029b03), ROM_SKIP(1))
+ ROMX_LOAD( "184504.bin", 0xe000, 0x0800, CRC(55fa7a1d) SHA1(58f7abab08b9d2f0a1c1636e11bb72af2694c95f), ROM_SKIP(1))
+ ROMX_LOAD( "184505.bin", 0xe001, 0x0800, CRC(c807e3f5) SHA1(08117e449f0d04f96041cff8d34893f500f3760d), ROM_SKIP(1))
+ ROMX_LOAD( "184506.bin", 0xf000, 0x0800, CRC(24f5c27c) SHA1(7822dd7f715ef00ccf6d8408be8bbfe01c2eba20), ROM_SKIP(1))
+ ROMX_LOAD( "184507.bin", 0xf001, 0x0800, CRC(75122203) SHA1(7b0fbdf1315230633e39574ac7360163bc7361e1), ROM_SKIP(1))
ROM_END
ROM_START( ec1847 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+ ROM_REGION16_LE(0x20000,"bios", 0)
ROM_SYSTEM_BIOS(0, "vXXX", "EC-1847.0x")
- ROMX_LOAD( "308_d47_2764.bin", 0xc8000, 0x2000, CRC(f06924f2) SHA1(83a5dedf1c06f875c598f087bbc087524bc9bfa3), ROM_BIOS(1))
- ROMX_LOAD( "188m_d47_2764.bin", 0xf4000, 0x2000, CRC(bc8742c7) SHA1(3af09d14e891e976b7a9a2a6e1af63f0eabe5426), ROM_BIOS(1))
- ROMX_LOAD( "188m_d48_2764.bin", 0xfe000, 0x2000, CRC(7d290e95) SHA1(e73e6c8e19477fce5de3f95b89693dc6ad6781ab), ROM_BIOS(1))
+ ROMX_LOAD( "308_d47_2764.bin", 0x08000, 0x2000, CRC(f06924f2) SHA1(83a5dedf1c06f875c598f087bbc087524bc9bfa3), ROM_BIOS(1))
+ ROMX_LOAD( "188m_d47_2764.bin", 0x14000, 0x2000, CRC(bc8742c7) SHA1(3af09d14e891e976b7a9a2a6e1af63f0eabe5426), ROM_BIOS(1))
+ ROMX_LOAD( "188m_d48_2764.bin", 0x1e000, 0x2000, CRC(7d290e95) SHA1(e73e6c8e19477fce5de3f95b89693dc6ad6781ab), ROM_BIOS(1))
ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00)
ROM_LOAD( "317_d28_2732.bin", 0x00000, 0x1000, CRC(8939599b) SHA1(53d02460cf93596882a96758ef4bac5fa1ce55b2)) // monochrome font
ROM_END
/* YEAR ROM NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
-COMP ( 1987, ec1840, ibm5150, 0, ec1840, ec1841, driver_device, 0, "<unknown>", "EC-1840", MACHINE_NOT_WORKING)
-COMP ( 1987, ec1841, ibm5150, 0, ec1841, ec1841, ec184x_state, ec1841, "<unknown>", "EC-1841", 0)
-COMP ( 1989, ec1845, ibm5150, 0, ec1841, ec1841, ec184x_state, ec1841, "<unknown>", "EC-1845", MACHINE_NOT_WORKING)
-COMP ( 1990, ec1847, ibm5150, 0, ec1847, ec1841, driver_device, 0, "<unknown>", "EC-1847", MACHINE_NOT_WORKING)
+COMP ( 1987, ec1840, ibm5150, 0, ec1840, 0, driver_device, 0, "<unknown>", "EC-1840", MACHINE_NOT_WORKING)
+COMP ( 1987, ec1841, ibm5150, 0, ec1841, 0, ec184x_state, ec1841, "<unknown>", "EC-1841", 0)
+COMP ( 1989, ec1845, ibm5150, 0, ec1841, 0, ec184x_state, ec1841, "<unknown>", "EC-1845", MACHINE_NOT_WORKING)
+COMP ( 1990, ec1847, ibm5150, 0, ec1847, 0, driver_device, 0, "<unknown>", "EC-1847", MACHINE_NOT_WORKING)
diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp
index 8a1f92ecfb0..476d1b1fda6 100644
--- a/src/mame/drivers/europc.cpp
+++ b/src/mame/drivers/europc.cpp
@@ -5,8 +5,6 @@
#include "includes/genpc.h"
#include "machine/nvram.h"
#include "machine/pckeybrd.h"
-#include "bus/isa/isa.h"
-#include "bus/isa/isa_cards.h"
class europc_pc_state : public driver_device
{
@@ -325,18 +323,18 @@ WRITE8_MEMBER( europc_pc_state::europc_rtc_w )
DRIVER_INIT_MEMBER(europc_pc_state,europc)
{
- UINT8 *rom = &memregion("maincpu")->base()[0];
+ UINT8 *rom = &memregion("bios")->base()[0];
int i;
/*
fix century rom bios bug !
if year <79 month (and not CENTURY) is loaded with 0x20
*/
- if (rom[0xff93e]==0xb6){ // mov dh,
+ if (rom[0xf93e]==0xb6){ // mov dh,
UINT8 a;
- rom[0xff93e]=0xb5; // mov ch,
- for (i=0xf8000, a=0; i<0xfffff; i++ ) a+=rom[i];
- rom[0xfffff]=256-a;
+ rom[0xf93e]=0xb5; // mov ch,
+ for (i=0x8000, a=0; i<0xffff; i++ ) a+=rom[i];
+ rom[0xffff]=256-a;
}
memset(&m_rtc_data,0,sizeof(m_rtc_data));
@@ -462,17 +460,13 @@ INPUT_PORTS_END
static ADDRESS_MAP_START( europc_map, AS_PROGRAM, 8, europc_pc_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xaffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_NOP
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(europc_io, AS_IO, 8, europc_pc_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0060, 0x0063) AM_READWRITE(europc_pio_r, europc_pio_w)
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", pc_noppi_mb_device, map)
AM_RANGE(0x0250, 0x025f) AM_READWRITE(europc_jim_r, europc_jim_w)
AM_RANGE(0x02e0, 0x02e0) AM_READ(europc_jim2_r)
ADDRESS_MAP_END
@@ -497,12 +491,13 @@ static MACHINE_CONFIG_START( europc, europc_pc_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K")
MACHINE_CONFIG_END
ROM_START( europc )
- ROM_REGION(0x100000,"maincpu", 0)
+ ROM_REGION(0x10000,"bios", 0)
// hdd bios integrated!
- ROM_LOAD("50145", 0xf8000, 0x8000, CRC(1775a11d) SHA1(54430d4d0462860860397487c9c109e6f70db8e3)) // V2.07
+ ROM_LOAD("50145", 0x8000, 0x8000, CRC(1775a11d) SHA1(54430d4d0462860860397487c9c109e6f70db8e3)) // V2.07
ROM_END
COMP( 1988, europc, ibm5150, 0, europc, europc, europc_pc_state, europc, "Schneider Rdf. AG", "EURO PC", MACHINE_NOT_WORKING)
diff --git a/src/mame/drivers/flower.cpp b/src/mame/drivers/flower.cpp
index 06891e9c4a2..26197104508 100644
--- a/src/mame/drivers/flower.cpp
+++ b/src/mame/drivers/flower.cpp
@@ -1,12 +1,13 @@
-// license:???
-// copyright-holders:insideoutboy, David Haywood, Stephh
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+// **** SKELETON DRIVER **** original removed due to unresolved licensing.
+
/*
Flower (c)1986 Komax (USA license)
(c)1986 Sega/Alpha (Sega game number 834-5998)
- - Driver by InsideOutBoy, further improvements by MAME team
-
There is a PCB picture that shows two stickers, the first says
"Flower (c) 1986 Clarue" while the second one is an original
serial number tag also showing "Clarue". GFX ROM contents also
@@ -74,215 +75,22 @@ CHIP # POSITION TYPE
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "includes/flower.h"
-
-
-WRITE8_MEMBER(flower_state::flower_maincpu_irq_ack)
-{
- m_maincpu->set_input_line(0, CLEAR_LINE);
-}
-WRITE8_MEMBER(flower_state::flower_subcpu_irq_ack)
+class flower_state : public driver_device
{
- m_subcpu->set_input_line(0, CLEAR_LINE);
-}
+public:
+ flower_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ { }
+};
-WRITE8_MEMBER(flower_state::flower_soundcpu_irq_ack)
-{
- m_audiocpu->set_input_line(0, CLEAR_LINE);
-}
-WRITE8_MEMBER(flower_state::flower_coin_counter_w)
-{
- machine().bookkeeping().coin_counter_w(0, data & 1);
-}
-
-WRITE8_MEMBER(flower_state::flower_coin_lockout_w)
-{
- machine().bookkeeping().coin_lockout_global_w(~data & 1);
-}
-WRITE8_MEMBER(flower_state::sound_command_w)
-{
- soundlatch_byte_w(space, 0, data);
-
- if (*m_sn_nmi_enable & 1)
- m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
-}
-
-static ADDRESS_MAP_START( flower_cpu1_2, AS_PROGRAM, 8, flower_state )
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0xa000, 0xa000) AM_WRITE(flower_coin_lockout_w)
- AM_RANGE(0xa001, 0xa001) AM_WRITE(flower_flipscreen_w)
- AM_RANGE(0xa002, 0xa002) AM_WRITE(flower_maincpu_irq_ack)
- AM_RANGE(0xa003, 0xa003) AM_WRITE(flower_subcpu_irq_ack)
- AM_RANGE(0xa004, 0xa004) AM_WRITE(flower_coin_counter_w)
- AM_RANGE(0xa005, 0xa005) AM_WRITENOP // subcpu nmi (unused)
- AM_RANGE(0xa100, 0xa100) AM_READ_PORT("IN0CPU1")
- AM_RANGE(0xa101, 0xa101) AM_READ_PORT("IN1CPU1")
- AM_RANGE(0xa102, 0xa102) AM_READ_PORT("IN0CPU0")
- AM_RANGE(0xa103, 0xa103) AM_READ_PORT("IN1CPU0")
- AM_RANGE(0xa400, 0xa400) AM_WRITE(sound_command_w)
- AM_RANGE(0xc000, 0xddff) AM_RAM AM_SHARE("mainram1")
- AM_RANGE(0xde00, 0xdfff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(flower_textram_w) AM_SHARE("textram")
- AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("mainram2") // only cleared?
- AM_RANGE(0xf000, 0xf1ff) AM_RAM_WRITE(flower_bg0ram_w) AM_SHARE("bg0ram")
- AM_RANGE(0xf200, 0xf200) AM_RAM AM_SHARE("bg0_scroll")
- AM_RANGE(0xf800, 0xf9ff) AM_RAM_WRITE(flower_bg1ram_w) AM_SHARE("bg1ram")
- AM_RANGE(0xfa00, 0xfa00) AM_RAM AM_SHARE("bg1_scroll")
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( flower_sound_cpu, AS_PROGRAM, 8, flower_state )
- AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x4000, 0x4000) AM_WRITE(flower_soundcpu_irq_ack)
- AM_RANGE(0x4001, 0x4001) AM_WRITEONLY AM_SHARE("sn_nmi_enable")
- AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
- AM_RANGE(0x8000, 0x803f) AM_DEVWRITE("flower", flower_sound_device, sound1_w)
- AM_RANGE(0xa000, 0xa03f) AM_DEVWRITE("flower", flower_sound_device, sound2_w)
- AM_RANGE(0xc000, 0xc7ff) AM_RAM
-ADDRESS_MAP_END
-
-
-INPUT_CHANGED_MEMBER(flower_state::coin_inserted)
-{
- m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
-}
static INPUT_PORTS_START( flower )
- PORT_START("IN0CPU0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, flower_state,coin_inserted, 0)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
- PORT_DIPNAME( 0x08, 0x08, "Energy Decrease" ) PORT_DIPLOCATION("SW2:4")
- PORT_DIPSETTING( 0x08, "Slow" )
- PORT_DIPSETTING( 0x00, "Fast" )
- PORT_DIPNAME( 0x10, 0x10, "Invulnerability (Cheat)") PORT_DIPLOCATION("SW2:5")
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "Keep Weapons When Destroyed" ) PORT_DIPLOCATION("SW2:6") // check code at 0x74a2
- PORT_DIPSETTING( 0x20, DEF_STR( No ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7") // "Enemy Bullets"
- PORT_DIPSETTING( 0x40, DEF_STR( Normal ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
- PORT_DIPNAME( 0x80, 0x80, "Shot Range" ) PORT_DIPLOCATION("SW2:8") // check code at 0x75f9
- PORT_DIPSETTING( 0x80, "Short" )
- PORT_DIPSETTING( 0x00, "Long" )
-
- PORT_START("IN1CPU0")
- PORT_DIPNAME( 0x07, 0x05, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2,3")
- PORT_DIPSETTING( 0x07, "1" )
- PORT_DIPSETTING( 0x06, "2" )
- PORT_DIPSETTING( 0x05, "3" )
- PORT_DIPSETTING( 0x04, "4" )
- PORT_DIPSETTING( 0x03, "5" )
- PORT_DIPSETTING( 0x02, "6" )
- PORT_DIPSETTING( 0x01, "7" )
- PORT_DIPSETTING( 0x00, "Infinite (Cheat)")
- PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4,5")
- PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:6") // check code at 0x759f
- PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Cocktail ) )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:7")
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:8")
- PORT_DIPSETTING( 0x80, "30k, then every 50k" )
- PORT_DIPSETTING( 0x00, "50k, then every 80k" )
-
- PORT_START("IN0CPU1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Laser")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Missile")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Cutter")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- PORT_START("IN1CPU1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Laser")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Missile")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL PORT_NAME("P2 Cutter")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
-static const gfx_layout flower_charlayout =
-{
- 8,8,
- RGN_FRAC(1,1),
- 2,
- { 0, 4 },
- { STEP4(0,1), STEP4(8,1) },
- { STEP8(0,16) },
- 8*8*2
-};
-
-static const gfx_layout flower_tilelayout =
-{
- 16,16,
- RGN_FRAC(1,2),
- 4,
- { 0, 4, RGN_FRAC(1,2), RGN_FRAC(1,2)+4 },
- { STEP4(0,1), STEP4(8,1), STEP4(8*8*2,1), STEP4(8*8*2+8,1) },
- { STEP8(0,16), STEP8(8*8*4,16) },
- 16*16*2
-};
-
-static GFXDECODE_START( flower )
- GFXDECODE_ENTRY( "gfx1", 0, flower_charlayout, 0, 64 )
- GFXDECODE_ENTRY( "gfx2", 0, flower_tilelayout, 0, 16 )
- GFXDECODE_ENTRY( "gfx3", 0, flower_tilelayout, 0, 16 )
-GFXDECODE_END
-
-
static MACHINE_CONFIG_START( flower, flower_state )
-
- /* basic machine hardware */
- // clock divider (of all cpus) is unknown. /6 (3.072 MHz) is too slow
- // cpus are Z80 "A" type, official maximum speed of 4 MHz, but 4.6 MHz has been proven to work in practice
- MCFG_CPU_ADD("maincpu", Z80,XTAL_18_432MHz/4)
- MCFG_CPU_PROGRAM_MAP(flower_cpu1_2)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", flower_state, irq0_line_hold)
-
- MCFG_CPU_ADD("subcpu", Z80,XTAL_18_432MHz/4)
- MCFG_CPU_PROGRAM_MAP(flower_cpu1_2)
- MCFG_CPU_PERIODIC_INT_DRIVER(flower_state, irq0_line_hold, 120) // controls game speed? irqsource and frequency unknown
-
- MCFG_CPU_ADD("audiocpu", Z80,XTAL_18_432MHz/4)
- MCFG_CPU_PROGRAM_MAP(flower_sound_cpu)
- MCFG_CPU_PERIODIC_INT_DRIVER(flower_state, irq0_line_hold, 90) // controls music speed. irqsource and frequency unknown, same as subcpu perhaps?
-
- // tight sync, slowdowns otherwise
-// MCFG_QUANTUM_PERFECT_CPU("maincpu")
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
-
- /* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60) // ?
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(34*8, 33*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 34*8-1, 0*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(flower_state, screen_update_flower)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", flower)
- MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", 256)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD("flower", FLOWER, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -373,5 +181,5 @@ ROM_START( flowerj ) /* Sega/Alpha version. Sega game number 834-5998 */
ROM_END
-GAME( 1986, flower, 0, flower, flower, driver_device, 0, ROT0, "Clarue (Komax license)", "Flower (US)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1986, flowerj, flower, flower, flower, driver_device, 0, ROT0, "Clarue (Sega / Alpha Denshi Co. license)", "Flower (Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE)
+GAME( 1986, flower, 0, flower, flower, driver_device, 0, ROT0, "Clarue (Komax license)", "Flower (US)", MACHINE_IS_SKELETON )
+GAME( 1986, flowerj, flower, flower, flower, driver_device, 0, ROT0, "Clarue (Sega / Alpha Denshi Co. license)", "Flower (Japan)", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp
index b3a303b083d..9c242647aae 100644
--- a/src/mame/drivers/galastrm.cpp
+++ b/src/mame/drivers/galastrm.cpp
@@ -1,4 +1,4 @@
-// license:???
+// license:BSD-3-Clause
// copyright-holders:Hau
/*
diff --git a/src/mame/drivers/genpc.cpp b/src/mame/drivers/genpc.cpp
index 72d267b69af..857bac57eeb 100644
--- a/src/mame/drivers/genpc.cpp
+++ b/src/mame/drivers/genpc.cpp
@@ -15,7 +15,6 @@
#include "cpu/nec/nec.h"
#include "cpu/i86/i86.h"
-#include "machine/pc_lpt.h"
#include "bus/pc_kbd/keyboards.h"
#include "softlist.h"
@@ -31,37 +30,25 @@ public:
static ADDRESS_MAP_START( pc8_map, AS_PROGRAM, 8, genpc_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START( pc16_map, AS_PROGRAM, 16, genpc_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
-
static ADDRESS_MAP_START(pc8_io, AS_IO, 8, genpc_state )
ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", ibm5160_mb_device, map)
ADDRESS_MAP_END
static ADDRESS_MAP_START(pc16_io, AS_IO, 16, genpc_state )
ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ibm5160_mb_device, map, 0xffff)
ADDRESS_MAP_END
-static INPUT_PORTS_START( pcgen )
-INPUT_PORTS_END
-
static DEVICE_INPUT_DEFAULTS_START(cga)
DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x20)
DEVICE_INPUT_DEFAULTS_END
@@ -70,7 +57,6 @@ static DEVICE_INPUT_DEFAULTS_START(vga)
DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x00)
DEVICE_INPUT_DEFAULTS_END
-
static MACHINE_CONFIG_START( pcmda, genpc_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", V20, 4772720)
@@ -93,147 +79,65 @@ static MACHINE_CONFIG_START( pcmda, genpc_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K")
/* software lists */
MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( pcherc, genpc_state )
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", V20, 4772720)
- MCFG_CPU_PROGRAM_MAP(pc8_map)
- MCFG_CPU_IO_MAP(pc8_io)
- MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
-
- MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu")
-
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "hercules", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "com", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "fdc_xt", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "hdc", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "adlib", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false)
-
- /* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
-
- /* internal ram */
- MCFG_RAM_ADD(RAM_TAG)
- MCFG_RAM_DEFAULT_SIZE("640K")
-
- /* software lists */
- MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150")
+static MACHINE_CONFIG_DERIVED( pcherc, pcmda )
+ MCFG_DEVICE_MODIFY("isa1")
+ MCFG_DEVICE_SLOT_INTERFACE(pc_isa8_cards, "hercules", false)
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( pccga, genpc_state )
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", I8086, 4772720)
+static MACHINE_CONFIG_DERIVED( pccga, pcmda )
+ MCFG_CPU_REPLACE("maincpu", I8086, 4772720)
MCFG_CPU_PROGRAM_MAP(pc16_map)
MCFG_CPU_IO_MAP(pc16_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
-
- MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu")
+ MCFG_DEVICE_MODIFY("mb")
MCFG_DEVICE_INPUT_DEFAULTS(cga)
-
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "cga", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "com", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "fdc_xt", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "hdc", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "sblaster1_0", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false)
-
- /* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
-
- /* internal ram */
- MCFG_RAM_ADD(RAM_TAG)
- MCFG_RAM_DEFAULT_SIZE("640K")
-
- /* software lists */
- MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150")
+ MCFG_DEVICE_MODIFY("isa1")
+ MCFG_DEVICE_SLOT_INTERFACE(pc_isa8_cards, "cga", false)
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( pcega, genpc_state )
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", I8086, 4772720)
- MCFG_CPU_PROGRAM_MAP(pc16_map)
- MCFG_CPU_IO_MAP(pc16_io)
- MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
-
- MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu")
+static MACHINE_CONFIG_DERIVED( pcega, pccga )
+ MCFG_DEVICE_MODIFY("isa1")
+ MCFG_DEVICE_SLOT_INTERFACE(pc_isa8_cards, "ega", false)
+ MCFG_DEVICE_MODIFY("mb")
MCFG_DEVICE_INPUT_DEFAULTS(vga)
-
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "com", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "hdc", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "sblaster1_0", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "ega", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false)
-
- /* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
-
- /* internal ram */
- MCFG_RAM_ADD(RAM_TAG)
- MCFG_RAM_DEFAULT_SIZE("640K")
-
- /* software lists */
- MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( xtvga, genpc_state )
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", I8086, 4772720)
- MCFG_CPU_PROGRAM_MAP(pc16_map)
- MCFG_CPU_IO_MAP(pc16_io)
- MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
-
- MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu")
- MCFG_DEVICE_INPUT_DEFAULTS(vga)
-
- MCFG_ISA8_SLOT_ADD("mb:isa","isa1", pc_isa8_cards, "com", false)
- MCFG_ISA8_SLOT_ADD("mb:isa","isa2", pc_isa8_cards, "fdc_xt", false)
- MCFG_ISA8_SLOT_ADD("mb:isa","isa3", pc_isa8_cards, "hdc", false)
- MCFG_ISA8_SLOT_ADD("mb:isa","isa4", pc_isa8_cards, "sblaster1_0", false)
- MCFG_ISA8_SLOT_ADD("mb:isa","isa5", pc_isa8_cards, "svga_et4k", false)
- MCFG_ISA8_SLOT_ADD("mb:isa","isa6", pc_isa8_cards, nullptr, false)
-
- /* keyboard */
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
-
- /* internal ram */
- MCFG_RAM_ADD(RAM_TAG)
- MCFG_RAM_DEFAULT_SIZE("640K")
-
- /* software lists */
- MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150")
+static MACHINE_CONFIG_DERIVED( xtvga, pcega )
+ MCFG_DEVICE_MODIFY("isa1")
+ MCFG_DEVICE_SLOT_INTERFACE(pc_isa8_cards, "svga_et4k", false)
MACHINE_CONFIG_END
ROM_START( pcmda )
- ROM_REGION(0x100000,"maincpu", 0)
+ ROM_REGION(0x10000,"bios", 0)
ROM_SYSTEM_BIOS(0, "anon", "XT Anonymous Generic Turbo BIOS")
- ROMX_LOAD("pcxt.rom", 0xfe000, 0x02000, CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f),ROM_BIOS(1))
+ ROMX_LOAD("pcxt.rom", 0xe000, 0x02000, CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f),ROM_BIOS(1))
ROM_SYSTEM_BIOS(1, "anon2007", "XT Anonymous Generic Turbo BIOS 2007")
- ROMX_LOAD( "pcxt2007.bin", 0xfe000, 0x2000, CRC(1d7bd86c) SHA1(33a500f599b4dad2fe6d7a5c3e89b13bd5dd2987),ROM_BIOS(2))
+ ROMX_LOAD( "pcxt2007.bin", 0xe000, 0x2000, CRC(1d7bd86c) SHA1(33a500f599b4dad2fe6d7a5c3e89b13bd5dd2987),ROM_BIOS(2))
ROM_SYSTEM_BIOS(2, "ami", "XT AMI")
- ROMX_LOAD( "ami.bin", 0xfe000, 0x2000, CRC(b381eb22) SHA1(9735193de119270c946a17ed58c3ab9554e0852e),ROM_BIOS(3))
+ ROMX_LOAD( "ami.bin", 0xe000, 0x2000, CRC(b381eb22) SHA1(9735193de119270c946a17ed58c3ab9554e0852e),ROM_BIOS(3))
ROM_SYSTEM_BIOS(3, "award", "XT Award 2.05")
- ROMX_LOAD( "award2.05.bin", 0xfe000, 0x2000, CRC(5b3953e5) SHA1(4a36171aa8d993008187f39f732b9296401b7b6c),ROM_BIOS(4))
+ ROMX_LOAD( "award2.05.bin", 0xe000, 0x2000, CRC(5b3953e5) SHA1(4a36171aa8d993008187f39f732b9296401b7b6c),ROM_BIOS(4))
ROM_SYSTEM_BIOS(4, "dtk", "XT DTK Erso bios 2.42")
- ROMX_LOAD( "dtk2.42.bin", 0xfe000, 0x2000, CRC(3f2d2a76) SHA1(02fa057f2c22ab199a8d9795ab1ae570f2b13a36),ROM_BIOS(5))
+ ROMX_LOAD( "dtk2.42.bin", 0xe000, 0x2000, CRC(3f2d2a76) SHA1(02fa057f2c22ab199a8d9795ab1ae570f2b13a36),ROM_BIOS(5))
ROM_SYSTEM_BIOS(5, "peter", "XT Peter Kohlman 3.75") // V20 Rom only
- ROMX_LOAD( "peterv203.75.bin", 0xfe000, 0x2000, CRC(b053a6a4) SHA1(f53218ad3d725f12d9149b22d8afcf6a8869a3bd),ROM_BIOS(6))
+ ROMX_LOAD( "peterv203.75.bin", 0xe000, 0x2000, CRC(b053a6a4) SHA1(f53218ad3d725f12d9149b22d8afcf6a8869a3bd),ROM_BIOS(6))
ROM_SYSTEM_BIOS(6, "pho227", "XT Phoenix Bios 2.27")
- ROMX_LOAD( "phoenix2.27.bin", 0xfe000, 0x2000, CRC(168ffef0) SHA1(69465db2f9246a614044d1f433d374506a13a07f),ROM_BIOS(7))
+ ROMX_LOAD( "phoenix2.27.bin", 0xe000, 0x2000, CRC(168ffef0) SHA1(69465db2f9246a614044d1f433d374506a13a07f),ROM_BIOS(7))
ROM_SYSTEM_BIOS(7, "pho251", "XT Phoenix Bios 2.51")
- ROMX_LOAD( "phoenix2.51.bin", 0xfe000, 0x2000, CRC(9b7e9c40) SHA1(c948a8d3d715e469105c6e2acd8b46ec274b25a8),ROM_BIOS(8))
+ ROMX_LOAD( "phoenix2.51.bin", 0xe000, 0x2000, CRC(9b7e9c40) SHA1(c948a8d3d715e469105c6e2acd8b46ec274b25a8),ROM_BIOS(8))
ROM_SYSTEM_BIOS(8, "turbo", "XT Turbo Bios 3.10")
- ROMX_LOAD( "turbo3.10.bin", 0xfe000, 0x2000, CRC(8aaca1e3) SHA1(9c03da16713e08c0112a04c8bdfa394e7341c1fc),ROM_BIOS(9))
+ ROMX_LOAD( "turbo3.10.bin", 0xe000, 0x2000, CRC(8aaca1e3) SHA1(9c03da16713e08c0112a04c8bdfa394e7341c1fc),ROM_BIOS(9))
ROM_END
#define rom_pcherc rom_pcmda
@@ -241,25 +145,25 @@ ROM_END
#define rom_pcega rom_pcmda
ROM_START( pc )
- ROM_REGION(0x100000,"maincpu", 0)
+ ROM_REGION(0x10000,"bios", 0)
ROM_SYSTEM_BIOS(0, "anon", "XT Anonymous Generic Turbo BIOS")
- ROMX_LOAD("pcxt.rom", 0xfe000, 0x02000, CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f),ROM_BIOS(1))
+ ROMX_LOAD("pcxt.rom", 0xe000, 0x02000, CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f),ROM_BIOS(1))
ROM_SYSTEM_BIOS(1, "anon2007", "XT Anonymous Generic Turbo BIOS 2007")
- ROMX_LOAD( "pcxt2007.bin", 0xfe000, 0x2000, CRC(1d7bd86c) SHA1(33a500f599b4dad2fe6d7a5c3e89b13bd5dd2987),ROM_BIOS(2))
+ ROMX_LOAD( "pcxt2007.bin", 0xe000, 0x2000, CRC(1d7bd86c) SHA1(33a500f599b4dad2fe6d7a5c3e89b13bd5dd2987),ROM_BIOS(2))
ROM_SYSTEM_BIOS(2, "ami", "XT AMI")
- ROMX_LOAD( "ami.bin", 0xfe000, 0x2000, CRC(b381eb22) SHA1(9735193de119270c946a17ed58c3ab9554e0852e),ROM_BIOS(3))
+ ROMX_LOAD( "ami.bin", 0xe000, 0x2000, CRC(b381eb22) SHA1(9735193de119270c946a17ed58c3ab9554e0852e),ROM_BIOS(3))
ROM_SYSTEM_BIOS(3, "award", "XT Award 2.05")
- ROMX_LOAD( "award2.05.bin", 0xfe000, 0x2000, CRC(5b3953e5) SHA1(4a36171aa8d993008187f39f732b9296401b7b6c),ROM_BIOS(4))
+ ROMX_LOAD( "award2.05.bin", 0xe000, 0x2000, CRC(5b3953e5) SHA1(4a36171aa8d993008187f39f732b9296401b7b6c),ROM_BIOS(4))
ROM_SYSTEM_BIOS(4, "dtk", "XT DTK Erso bios 2.42")
- ROMX_LOAD( "dtk2.42.bin", 0xfe000, 0x2000, CRC(3f2d2a76) SHA1(02fa057f2c22ab199a8d9795ab1ae570f2b13a36),ROM_BIOS(5))
+ ROMX_LOAD( "dtk2.42.bin", 0xe000, 0x2000, CRC(3f2d2a76) SHA1(02fa057f2c22ab199a8d9795ab1ae570f2b13a36),ROM_BIOS(5))
ROM_SYSTEM_BIOS(5, "peter", "XT Peter Kohlman 3.75")
- ROMX_LOAD( "peterv203.75.bin", 0xfe000, 0x2000, CRC(b053a6a4) SHA1(f53218ad3d725f12d9149b22d8afcf6a8869a3bd),ROM_BIOS(6))
+ ROMX_LOAD( "peterv203.75.bin", 0xe000, 0x2000, CRC(b053a6a4) SHA1(f53218ad3d725f12d9149b22d8afcf6a8869a3bd),ROM_BIOS(6))
ROM_SYSTEM_BIOS(6, "pho227", "XT Phoenix Bios 2.27")
- ROMX_LOAD( "phoenix2.27.bin", 0xfe000, 0x2000, CRC(168ffef0) SHA1(69465db2f9246a614044d1f433d374506a13a07f),ROM_BIOS(7))
+ ROMX_LOAD( "phoenix2.27.bin", 0xe000, 0x2000, CRC(168ffef0) SHA1(69465db2f9246a614044d1f433d374506a13a07f),ROM_BIOS(7))
ROM_SYSTEM_BIOS(7, "pho251", "XT Phoenix Bios 2.51")
- ROMX_LOAD( "phoenix2.51.bin", 0xfe000, 0x2000, CRC(9b7e9c40) SHA1(c948a8d3d715e469105c6e2acd8b46ec274b25a8),ROM_BIOS(8))
+ ROMX_LOAD( "phoenix2.51.bin", 0xe000, 0x2000, CRC(9b7e9c40) SHA1(c948a8d3d715e469105c6e2acd8b46ec274b25a8),ROM_BIOS(8))
ROM_SYSTEM_BIOS(8, "turbo", "XT Turbo Bios 3.10")
- ROMX_LOAD( "turbo3.10.bin", 0xfe000, 0x2000, CRC(8aaca1e3) SHA1(9c03da16713e08c0112a04c8bdfa394e7341c1fc),ROM_BIOS(9))
+ ROMX_LOAD( "turbo3.10.bin", 0xe000, 0x2000, CRC(8aaca1e3) SHA1(9c03da16713e08c0112a04c8bdfa394e7341c1fc),ROM_BIOS(9))
/* IBM 1501981(CGA) and 1501985(MDA) Character rom */
ROM_REGION(0x2000,"gfx1", 0)
ROM_LOAD("5788005.u33", 0x00000, 0x2000, CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) /* "AMI 8412PI // 5788005 // (C) IBM CORP. 1981 // KOREA" */
@@ -274,8 +178,8 @@ ROM_END
***************************************************************************/
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
-COMP( 1987, pc, ibm5150, 0, pccga, pcgen, driver_device, 0, "<generic>", "PC (CGA)" , 0)
-COMP( 1987, pcega, ibm5150, 0, pcega, pcgen, driver_device, 0, "<generic>", "PC (EGA)" , 0)
-COMP ( 1987, pcmda, ibm5150, 0, pcmda, pcgen, driver_device, 0, "<generic>", "PC (MDA)" , 0)
-COMP ( 1987, pcherc, ibm5150, 0, pcherc, pcgen, driver_device, 0, "<generic>", "PC (Hercules)" , 0)
-COMP ( 1987, xtvga, ibm5150, 0, xtvga, pcgen, driver_device, 0, "<generic>", "PC (VGA)" , MACHINE_NOT_WORKING)
+COMP( 1987, pc, ibm5150, 0, pccga, 0, driver_device, 0, "<generic>", "PC (CGA)" , 0)
+COMP( 1987, pcega, ibm5150, 0, pcega, 0, driver_device, 0, "<generic>", "PC (EGA)" , 0)
+COMP ( 1987, pcmda, ibm5150, 0, pcmda, 0, driver_device, 0, "<generic>", "PC (MDA)" , 0)
+COMP ( 1987, pcherc, ibm5150, 0, pcherc, 0, driver_device, 0, "<generic>", "PC (Hercules)" , 0)
+COMP ( 1987, xtvga, ibm5150, 0, xtvga, 0, driver_device, 0, "<generic>", "PC (VGA)" , MACHINE_NOT_WORKING)
diff --git a/src/mame/drivers/glasgow.cpp b/src/mame/drivers/glasgow.cpp
index d34fb059961..e8922472d5b 100644
--- a/src/mame/drivers/glasgow.cpp
+++ b/src/mame/drivers/glasgow.cpp
@@ -1,5 +1,5 @@
-// license:???
-// copyright-holders:Dirk Verwiebe, Robbbert, Cowering, Ralf Schaefer
+// license:BSD-3-Clause
+// copyright-holders:Dirk Verwiebe, Robbbert, Cowering
/***************************************************************************
Mephisto Glasgow 3 S chess computer
Dirk V.
@@ -39,27 +39,19 @@ How to play (quick guide)
Note about clickable artwork: You need to be running in windowed mode;
and you need to use newui.
-R.Schaefer Oct 2010
-
-1. everything concerning chessboard moved to machine mboard
-2. Border pieces added. This allow setting up and repair chess positons
-3. chessboard added for Amsterdam, Dallas 16 Bit, Dallas 32 Bit, Roma 32 Bit
-4. Save states added.
-
***************************************************************************/
#include "emu.h"
#include "cpu/m68000/m68000.h"
#include "glasgow.lh"
#include "sound/beep.h"
-#include "includes/mboard.h"
-class glasgow_state : public mboard_state
+class glasgow_state : public driver_device
{
public:
glasgow_state(const machine_config &mconfig, device_type type, const char *tag)
- : mboard_state(mconfig, type, tag),
+ : driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_beep(*this, "beeper"),
m_line0(*this, "LINE0"),
@@ -121,7 +113,6 @@ WRITE16_MEMBER( glasgow_state::glasgow_lcd_flag_w )
else
{
m_led7 = 0;
- mboard_key_selector = 1;
}
}
@@ -129,28 +120,17 @@ READ16_MEMBER( glasgow_state::glasgow_keys_r )
{
UINT8 data = 0xff;
- /* See if any keys pressed */
- data = 3;
-
- if (mboard_key_select == m_line0->read())
- data &= 1;
-
- if (mboard_key_select == m_line1->read())
- data &= 2;
-
return data << 8;
}
WRITE16_MEMBER( glasgow_state::glasgow_keys_w )
{
- mboard_key_select = data >> 8;
}
WRITE16_MEMBER( glasgow_state::write_lcd )
{
UINT8 lcd_data = data >> 8;
- output().set_digit_value(m_lcd_shift_counter, mboard_lcd_invert & 1 ? 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);
@@ -159,12 +139,10 @@ WRITE16_MEMBER( glasgow_state::write_lcd )
WRITE16_MEMBER( glasgow_state::write_lcd_flag )
{
// UINT8 lcd_flag;
- mboard_lcd_invert = 0;
// lcd_flag=data >> 8;
//m_beep->set_state((data >> 8) & 1 ? 1 : 0);
if ((data >> 8) == 0)
{
- mboard_key_selector = 1;
m_led7 = 0;
}
else
@@ -191,16 +169,7 @@ WRITE16_MEMBER( glasgow_state::write_irq_flag )
READ16_MEMBER( glasgow_state::read_newkeys16 ) //Amsterdam, Roma
{
- UINT16 data;
-
- if (mboard_key_selector == 0)
- data = m_line0->read();
- else
- data = m_line1->read();
-
- logerror("read Keyboard Offset = %x Data = %x Select = %x \n", offset, data, mboard_key_selector);
- data <<= 8;
- return data ;
+ return 0;
}
@@ -220,9 +189,6 @@ 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, mboard_lcd_invert & 1 ? lcd_data^0xff : lcd_data);
m_lcd_shift_counter--;
m_lcd_shift_counter &= 3;
//logerror("LCD Offset = %d Data = %x \n ", offset, lcd_data);
@@ -232,11 +198,8 @@ WRITE32_MEMBER( glasgow_state::write_lcd_flag32 )
{
// UINT8 lcd_flag = data >> 24;
- mboard_lcd_invert = 0;
-
if ((data >> 24) == 0)
{
- mboard_key_selector = 1;
m_led7 = 0;
}
else
@@ -254,17 +217,7 @@ WRITE32_MEMBER( glasgow_state::write_lcd_flag32 )
READ32_MEMBER( glasgow_state::read_newkeys32 ) // Dallas 32, Roma 32
{
- UINT32 data;
-
- if (mboard_key_selector == 0)
- data = m_line0->read();
- else
- data = m_line1->read();
- //if (mboard_key_selector == 1) data = m_line0->read(); else data = 0;
- if(data)
- logerror("read Keyboard Offset = %x Data = %x\n", offset, data);
- data <<= 24;
- return data ;
+ return 0;
}
#ifdef UNUSED_FUNCTION
@@ -295,28 +248,20 @@ TIMER_DEVICE_CALLBACK_MEMBER(glasgow_state::update_nmi32)
void glasgow_state::machine_start()
{
- mboard_key_selector = 0;
m_irq_flag = 0;
m_lcd_shift_counter = 3;
-
- mboard_savestate_register();
}
MACHINE_START_MEMBER(glasgow_state,dallas32)
{
m_lcd_shift_counter = 3;
-
- mboard_savestate_register();
}
void glasgow_state::machine_reset()
{
m_lcd_shift_counter = 3;
-
- mboard_set_border_pieces();
- mboard_set_board();
}
static ADDRESS_MAP_START(glasgow_mem, AS_PROGRAM, 16, glasgow_state)
@@ -325,8 +270,6 @@ static ADDRESS_MAP_START(glasgow_mem, AS_PROGRAM, 16, glasgow_state)
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(0x00010006, 0x00010007) AM_READWRITE(mboard_read_board_16,mboard_write_LED_16)
- AM_RANGE(0x00010008, 0x00010009) AM_WRITE(mboard_write_board_16)
AM_RANGE(0x0001c000, 0x0001ffff) AM_RAM // 16KB
ADDRESS_MAP_END
@@ -337,10 +280,7 @@ static ADDRESS_MAP_START(amsterd_mem, AS_PROGRAM, 16, glasgow_state)
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(0x00800010, 0x00800011) AM_WRITE(mboard_write_board_16)
- AM_RANGE(0x00800020, 0x00800021) AM_READ(mboard_read_board_16)
AM_RANGE(0x00800040, 0x00800041) AM_READ(read_newkeys16)
- AM_RANGE(0x00800088, 0x00800089) AM_WRITE(mboard_write_LED_16)
AM_RANGE(0x00ffc000, 0x00ffffff) AM_RAM // 16KB
ADDRESS_MAP_END
@@ -352,10 +292,7 @@ static ADDRESS_MAP_START(dallas32_mem, AS_PROGRAM, 32, glasgow_state)
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(0x00800010, 0x00800013) AM_WRITE(mboard_write_board_32)
- AM_RANGE(0x00800020, 0x00800023) AM_READ(mboard_read_board_32)
AM_RANGE(0x00800040, 0x00800043) AM_READ(read_newkeys32)
- AM_RANGE(0x00800088, 0x0080008b) AM_WRITE(mboard_write_LED_32)
ADDRESS_MAP_END
static INPUT_PORTS_START( new_keyboard ) //Amsterdam, Dallas 32, Roma, Roma 32
@@ -407,12 +344,10 @@ 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 )
- PORT_INCLUDE( chessboard )
INPUT_PORTS_END
static MACHINE_CONFIG_START( glasgow, glasgow_state )
@@ -424,7 +359,6 @@ static MACHINE_CONFIG_START( glasgow, glasgow_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", glasgow_state, update_nmi, attotime::from_hz(50))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", glasgow_state, mboard_update_artwork, attotime::from_hz(100))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( amsterd, glasgow )
@@ -500,10 +434,10 @@ ROM_END
***************************************************************************/
/* 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_SUPPORTS_SAVE)
-CONS( 1984, amsterd, 0, 0, amsterd, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Amsterdam", MACHINE_SUPPORTS_SAVE)
-CONS( 1984, dallas, glasgow, 0, glasgow, oldkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas", MACHINE_SUPPORTS_SAVE)
+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_SUPPORTS_SAVE)
-CONS( 1984, roma32, amsterd, 0, dallas32, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Roma 32 Bit", MACHINE_SUPPORTS_SAVE)
-CONS( 1984, dallas16, amsterd, 0, amsterd, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas 16 Bit", MACHINE_SUPPORTS_SAVE)
+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)
diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp
index 78ef6c2271c..abd92f5867d 100644
--- a/src/mame/drivers/hh_cop400.cpp
+++ b/src/mame/drivers/hh_cop400.cpp
@@ -17,6 +17,7 @@
#include "sound/speaker.h"
// internal artwork
+#include "ctstein.lh" // clickable
#include "einvaderc.lh" // test-layout(but still playable)
#include "funjacks.lh"
#include "funrlgl.lh"
@@ -234,8 +235,10 @@ UINT8 hh_cop400_state::read_inputs(int columns)
/***************************************************************************
Castle Toy Einstein
- * COP421 MCU labeled ~/927 COP421-NEZ/N
+ * COP421 MCU label ~/927 COP421-NEZ/N
* 4 lamps, 1-bit sound
+
+ This is a Simon clone, the tones are not harmonic.
***************************************************************************/
@@ -245,26 +248,75 @@ public:
ctstein_state(const machine_config &mconfig, device_type type, const char *tag)
: hh_cop400_state(mconfig, type, tag)
{ }
+
+ DECLARE_WRITE8_MEMBER(write_g);
+ DECLARE_WRITE8_MEMBER(write_l);
+ DECLARE_WRITE_LINE_MEMBER(write_sk);
+ DECLARE_READ8_MEMBER(read_l);
};
// handlers
-//..
+WRITE8_MEMBER(ctstein_state::write_g)
+{
+ // G0-G2: input mux
+ m_inp_mux = ~data & 7;
+}
+
+WRITE8_MEMBER(ctstein_state::write_l)
+{
+ // L0-L3: button lamps (strobed)
+ display_matrix(4, 1, data, 1);
+ display_matrix(4, 1, data, 0);
+}
+
+READ8_MEMBER(ctstein_state::read_l)
+{
+ // L4-L7: multiplexed inputs
+ return read_inputs(3) << 4 | 0xf;
+}
+
+WRITE_LINE_MEMBER(ctstein_state::write_sk)
+{
+ // SK: speaker out
+ m_speaker->level_w(state);
+}
// config
static INPUT_PORTS_START( ctstein )
+ PORT_START("IN.0") // G0 port L
+ PORT_CONFNAME( 0x0f, 0x01^0x0f, DEF_STR( Difficulty ) )
+ PORT_CONFSETTING( 0x01^0x0f, "1" )
+ PORT_CONFSETTING( 0x02^0x0f, "2" )
+ PORT_CONFSETTING( 0x04^0x0f, "3" )
+ PORT_CONFSETTING( 0x08^0x0f, "4" )
+
+ PORT_START("IN.1") // G1 port L
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("Best Score")
+ PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START("IN.2") // G2 port L
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Red Button")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Yellow Button")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Green Button")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Blue Button")
INPUT_PORTS_END
static MACHINE_CONFIG_START( ctstein, ctstein_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", COP421, 1000000) // approximation - RC osc. R=12K to +6V, C=100pf to GND
- MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed
+ MCFG_CPU_ADD("maincpu", COP421, 850000) // approximation - RC osc. R=12K to +6V, C=100pf to GND
+ MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed
+ MCFG_COP400_WRITE_G_CB(WRITE8(ctstein_state, write_g))
+ MCFG_COP400_WRITE_L_CB(WRITE8(ctstein_state, write_l))
+ MCFG_COP400_WRITE_SK_CB(WRITELINE(ctstein_state, write_sk))
+ MCFG_COP400_READ_L_CB(READ8(ctstein_state, read_l))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_cop400_state, display_decay_tick, attotime::from_msec(1))
-// MCFG_DEFAULT_LAYOUT(layout_ctstein)
+ MCFG_DEFAULT_LAYOUT(layout_ctstein)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -279,7 +331,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Coleco Head to Head Basketball
- * COP420 MCU labeled COP420L-NEZ/N
+ * COP420 MCU label COP420L-NEZ/N
* 2-digit 7seg display, 41 other leds, 1-bit sound
***************************************************************************/
@@ -324,7 +376,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Entex Space Invader
- * COP444L MCU labeled /B138 COPL444-HRZ/N INV II (die labeled HRZ COP 444L/A)
+ * COP444L MCU label /B138 COPL444-HRZ/N INV II (die label HRZ COP 444L/A)
* 3 7seg LEDs, LED matrix and overlay mask, 1-bit sound
The first version was on TMS1100 (see hh_tms1k.c), this is the reprogrammed
@@ -440,7 +492,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Mattel Funtronics Jacks
- * COP410L MCU bonded directly to PCB (die labeled COP410L/B NGS)
+ * COP410L MCU bonded directly to PCB (die label COP410L/B NGS)
* 8 LEDs, 1-bit sound
***************************************************************************/
@@ -547,7 +599,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Mattel Funtronics Red Light Green Light
- * COP410L MCU bonded directly to PCB (die labeled COP410L/B NHZ)
+ * COP410L MCU bonded directly to PCB (die label COP410L/B NHZ)
* 14 LEDs, 1-bit sound
known releases:
@@ -642,7 +694,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Milton Bradley Plus One
- * COP410L MCU in 8-pin DIP, labeled ~/029 MM 57405 (die labeled COP410L/B NNE)
+ * COP410L MCU in 8-pin DIP, label ~/029 MM 57405 (die label COP410L/B NNE)
* 4 sensors(1 on each die side), 1-bit sound
***************************************************************************/
@@ -653,16 +705,34 @@ public:
plus1_state(const machine_config &mconfig, device_type type, const char *tag)
: hh_cop400_state(mconfig, type, tag)
{ }
+
+ DECLARE_WRITE8_MEMBER(write_d);
};
// handlers
-//..
+WRITE8_MEMBER(plus1_state::write_d)
+{
+ // D?: speaker out
+ m_speaker->level_w(data & 1);
+}
// config
static INPUT_PORTS_START( plus1 )
+ PORT_START("IN.0") // port G
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START("IN.1") // port L
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 )
+ PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static MACHINE_CONFIG_START( plus1, plus1_state )
@@ -670,6 +740,9 @@ static MACHINE_CONFIG_START( plus1, plus1_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", COP410, 1000000) // approximation - RC osc. R=51K to +5V, C=100pf to GND
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, true) // guessed
+ MCFG_COP400_WRITE_D_CB(WRITE8(plus1_state, write_d))
+ MCFG_COP400_READ_G_CB(IOPORT("IN.0"))
+ MCFG_COP400_READ_L_CB(IOPORT("IN.1"))
/* no visual feedback! */
@@ -686,7 +759,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Milton Bradley (Electronic) Lightfight
- * COP421L MCU labeled /B119 COP421L-HLA/N
+ * COP421L MCU label /B119 COP421L-HLA/N
* LED matrix, 1-bit sound
Xbox-shaped electronic game for 2 or more players, with long diagonal buttons
@@ -870,7 +943,7 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
-CONS( 1979, ctstein, 0, 0, ctstein, ctstein, driver_device, 0, "Castle Toy", "Einstein (Castle Toy)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+CONS( 1979, ctstein, 0, 0, ctstein, ctstein, driver_device, 0, "Castle Toy", "Einstein (Castle Toy)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1979, h2hbaskb, 0, 0, h2hbaskb, h2hbaskb, driver_device, 0, "Coleco", "Head to Head Basketball (COP420L)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp
index 0ed890fc5d5..d3639a6fb84 100644
--- a/src/mame/drivers/hh_hmcs40.cpp
+++ b/src/mame/drivers/hh_hmcs40.cpp
@@ -58,10 +58,10 @@
@88 HD38820A 1984, Bandai Pair Match (PT-460) (1/2)
@89 HD38820A 1984, Bandai Pair Match (PT-460) (2/2)
- *75 HD44801A 1982, Alpha 8201 protection MCU (have dump)
+ 75 HD44801A 1982, Alpha 8201 protection MCU -> machine/alpha8201.*
- *35 HD44801B 1983, Alpha 8302 protection MCU (have dump)
- *42 HD44801B 1984, Alpha 8303 protection MCU (have dump)
+ 35 HD44801B 1983, Alpha 8302 protection MCU (see 8201)
+ 42 HD44801B 1984, Alpha 8303 protection MCU (see 8201)
(* denotes not yet emulated by MAME, @ denotes it's in this driver)
@@ -333,7 +333,7 @@ INPUT_CHANGED_MEMBER(hh_hmcs40_state::single_interrupt_line)
/***************************************************************************
Bambino Dribble Away Basketball (manufactured in Japan)
- * PCBs are labeled Emix Corp. ET-05
+ * PCB label Emix Corp. ET-05
* Hitachi HD38750A08 MCU
* green VFD display Emix-106, with bezel overlay
@@ -443,7 +443,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Bambino Knock-Em Out Boxing
- * PCBs are labeled Emix Corp. ET-06B
+ * PCB label Emix Corp. ET-06B
* Hitachi HD38750A07 MCU
* cyan VFD display Emix-103, with blue or green color overlay
@@ -577,7 +577,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Bandai Frisky Tom (manufactured in Japan)
- * PCBs are labeled Kaken Corp., PT-327A
+ * PCB label Kaken Corp., PT-327A
* Hitachi HD38800A77 MCU
* cyan/red/green VFD display Futaba DM-43ZK 2E
@@ -807,7 +807,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Bandai/Mattel Star Hawk (manufactured in Japan)
- * PCBs are labeled Kaken, PT-317B
+ * PCB label Kaken, PT-317B
* Hitachi HD38800A73 MCU
* cyan/red VFD display Futaba DM-41ZK, with partial color overlay + bezel
@@ -2623,7 +2623,7 @@ INPUT_PORTS_END
Entex Turtles (manufactured in Japan)
* PCB label 560359
* Hitachi QFP HD38820A43 MCU
- * COP411L sub MCU, labeled COP411L-KED/N
+ * COP411L sub MCU, label COP411L-KED/N
* cyan/red/green VFD display NEC FIP15BM32T
NOTE!: MAME external artwork is required
@@ -2814,7 +2814,7 @@ MACHINE_CONFIG_END
Entex Stargate (manufactured in Japan)
* PCB label 5603521/31
* Hitachi QFP HD38820A42 MCU
- * COP411L sub MCU, labeled ~/B8236 COP411L-KEC/N
+ * COP411L sub MCU, label ~/B8236 COP411L-KEC/N
* cyan/red/green VFD display NEC FIP15AM32T (EL628-003) no. 2-421, with partial color overlay
NOTE!: MAME external artwork is required
@@ -3521,7 +3521,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Tomy Kingman (manufactured in Japan)
- * PCBs are labeled THF-01II 2E138E01/2E128E02
+ * PCB label THF-01II 2E138E01/2E128E02
* Hitachi HD38800B23 MCU
* cyan/red/blue VFD display Futaba DM-65ZK 3A
@@ -3640,7 +3640,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Tomy(tronic) Tron (manufactured in Japan)
- * PCBs are labeled THN-02 2E114E07
+ * PCB label THN-02 2E114E07
* Hitachi HD38800A88 MCU
* cyan/red/green VFD display NEC FIP10AM24T no. 2-8 1
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index 0dea42a26fa..afc5cafe475 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -364,7 +364,7 @@ INPUT_CHANGED_MEMBER(hh_tms1k_state::power_button)
/***************************************************************************
APF Mathemagician
- * TMS1100 MCU, labeled MP1030 (no decap)
+ * TMS1100 MCU, label MP1030 (no decap)
* 2 x DS8870N - Hex LED Digit Driver
* 2 x DS8861N - MOS-to-LED 5-Segment Driver
* 10-digit 7seg LED display(2 custom ones) + 4 LEDs, no sound
@@ -542,7 +542,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Coleco Amaze-A-Tron, by Ralph Baer
- * TMS1100 MCU, labeled MP3405(die label too)
+ * TMS1100 MCU, label MP3405(die label too)
* 2-digit 7seg LED display + 2 LEDs(one red, one green), 1-bit sound
* 5*5 pressure-sensitive playing board(buttons), 4 game pieces
@@ -834,7 +834,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Coleco Electronic Quarterback
- * TMS1100NLL MP3415 (die labeled MP3415)
+ * TMS1100NLL MP3415 (die label MP3415)
* 9-digit LED grid, 1-bit sound
known releases:
@@ -945,7 +945,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Coleco Head to Head Football
- * TMS1100NLLE (rev. E!) MP3460 (die labeled MP3460)
+ * TMS1100NLLE (rev. E!) MP3460 (die label MP3460)
* 2*SN75492N LED display drivers, 9-digit LED grid, 1-bit sound
known releases:
@@ -1060,7 +1060,7 @@ MACHINE_CONFIG_END
Coleco Head to Head Baseball
* PCB labels Coleco rev C 73891/2
- * TMS1170NLN MP1525-N2 (die labeled MP1525)
+ * TMS1170NLN MP1525-N2 (die label MP1525)
* 9-digit cyan VFD display, and other LEDs behind bezel, 1-bit sound
known releases:
@@ -1199,7 +1199,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Coleco Total Control 4
- * TMS1400NLL MP7334-N2 (die labeled MP7334)
+ * TMS1400NLL MP7334-N2 (die label MP7334)
* 2x2-digit 7seg LED display + 4 LEDs, LED grid display, 1-bit sound
This is a head to head electronic tabletop LED-display sports console.
@@ -1479,7 +1479,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Entex (Electronic) Baseball (1)
- * TMS1000NLP MP0914 (die labeled MP0914A)
+ * TMS1000NLP MP0914 (die label MP0914A)
* 1 7seg LED, and other LEDs behind bezel, 1-bit sound
This is a handheld LED baseball game. One player controls the batter, the CPU
@@ -1614,8 +1614,8 @@ MACHINE_CONFIG_END
/***************************************************************************
Entex (Electronic) Baseball 2
- * PCBs are labeled: ZENY
- * TMS1000 MCU, MP0923 (die labeled MP0923)
+ * PCB label: ZENY
+ * TMS1000 MCU, MP0923 (die label MP0923)
* 3 7seg LEDs, and other LEDs behind bezel, 1-bit sound
The Japanese version was published by Gakken, black casing instead of white.
@@ -1739,8 +1739,8 @@ MACHINE_CONFIG_END
/***************************************************************************
Entex (Electronic) Baseball 3
- * PCBs are labeled: ZENY
- * TMS1100NLL 6007 MP1204 (rev. E!) (die labeled MP1204)
+ * PCB label: ZENY
+ * TMS1100NLL 6007 MP1204 (rev. E!) (die label MP1204)
* 2*SN75492N LED display driver
* 4 7seg LEDs, and other LEDs behind bezel, 1-bit sound
@@ -1920,7 +1920,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Entex Space Invader
- * TMS1100 MP1211 (die labeled MP1211)
+ * TMS1100 MP1211 (die label MP1211)
* 3 7seg LEDs, LED matrix and overlay mask, 1-bit sound
There are two versions of this game: the first release(this one) is on
@@ -2034,7 +2034,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Entex Color Football 4
- * TMS1670 6009 MP7551 (die also labeled MP7551)
+ * TMS1670 6009 MP7551 (die also label MP7551)
* 9-digit cyan VFD display, 60 red and green LEDs behind bezel, 1-bit sound
***************************************************************************/
@@ -2151,7 +2151,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Entex (Electronic) Basketball 2
- * TMS1100 6010 MP1218 (die also labeled MP1218)
+ * TMS1100 6010 MP1218 (die also label MP1218)
* 4 7seg LEDs, and other LEDs behind bezel, 1-bit sound
lamp translation table: led zz from game PCB = MAME lampyx:
@@ -2274,7 +2274,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Entex Raise The Devil
- * TMS1100 MP1221 (die labeled MP1221)
+ * TMS1100 MP1221 (die label MP1221)
* 4 7seg LEDs(rightmost one unused), and other LEDs behind bezel, 1-bit sound
lamp translation table: led zz from game PCB = MAME lampyx:
@@ -2417,7 +2417,7 @@ MACHINE_CONFIG_END
Gakken Poker
* PCB label POKER. gakken
- * TMS1370 MP2105 (die labeled MP2105)
+ * TMS1370 MP2105 (die label MP2105)
* 11-digit cyan VFD display Itron FG1114B, oscillator sound
known releases:
@@ -2562,7 +2562,7 @@ MACHINE_CONFIG_END
Gakken Jackpot: Gin Rummy & Black Jack
* PCB label gakken
- * TMS1670 MPF553 (die labeled MPF553)
+ * TMS1670 MPF553 (die label MPF553)
* 11-digit cyan VFD display Itron FG1114B, oscillator sound
known releases:
@@ -2674,7 +2674,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Ideal Electronic Detective
- * TMS0980NLL MP6100A (die labeled 0980B-00)
+ * TMS0980NLL MP6100A (die label 0980B-00)
* 10-digit 7seg LED display, 2-level sound
hardware (and concept) is very similar to Parker Brothers Stop Thief
@@ -2805,7 +2805,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Kenner Star Wars - Electronic Battle Command
- * TMS1100 MCU, labeled MP3438A
+ * TMS1100 MCU, label MP3438A
* 4x4 LED grid display + 2 separate LEDs and 2-digit 7segs, 1-bit sound
This is a small tabletop space-dogfighting game. To start the game,
@@ -2931,7 +2931,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Kosmos Astro
- * TMS1470NLHL MP1133 (die labeled TMS1400 MP1133)
+ * TMS1470NLHL MP1133 (die label TMS1400 MP1133)
* 9digit 7seg VFD display + 8 LEDs(4 green, 4 yellow), no sound
This is an astrological calculator, and also supports 4-function
@@ -3055,7 +3055,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Mattel Dungeons & Dragons - Computer Labyrinth Game
- * TMS1100 M34012-N2LL (die labeled M34012)
+ * TMS1100 M34012-N2LL (die label M34012)
* 72 buttons, no LEDs, 1-bit sound
This is an electronic board game. It requires markers and wall pieces to play.
@@ -3236,7 +3236,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Milton Bradley Comp IV
- * TMC0904NL CP0904A (die labeled 4A0970D-04A)
+ * TMC0904NL CP0904A (die label 4A0970D-04A)
* 10 LEDs behind bezel, no sound
known releases:
@@ -3340,7 +3340,7 @@ MACHINE_CONFIG_END
Milton Bradley Simon, created by Ralph Baer
Revision A hardware:
- * TMS1000 (die labeled MP3226)
+ * TMS1000 (die label MP3226)
* DS75494 Hex digit LED driver, 4 big lamps, 1-bit sound
Newer revisions (also Pocket Simon) have a smaller 16-pin MB4850 chip
@@ -3441,7 +3441,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Milton Bradley Super Simon
- * TMS1100 MP3476NLL (die labeled MP3476)
+ * TMS1100 MP3476NLL (die label MP3476)
* 8 big lamps(2 turn on at same time), 1-bit sound
The semi-squel to Simon, not as popular. It includes more game variations
@@ -3583,7 +3583,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Milton Bradley Big Trak
- * TMS1000NLL MP3301A or MP3301ANLL E (rev. E!) (die labeled 1000E MP3301)
+ * TMS1000NLL MP3301A or MP3301ANLL E (rev. E!) (die label 1000E MP3301)
* SN75494N Hex digit LED driver, 1 lamp, 3-level sound
* gearbox with magnetic clutch, 1 IR led+sensor, 2 motors(middle wheels)
* 24-button keypad, ext in/out ports
@@ -3767,7 +3767,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Parker Brothers Code Name: Sector, by Bob Doyle
- * TMS0970 MCU, MP0905BNL ZA0379 (die labeled 0970F-05B)
+ * TMS0970 MCU, MP0905BNL ZA0379 (die label 0970F-05B)
* 6-digit 7seg LED display + 4 LEDs for compass, no sound
This is a tabletop submarine pursuit game. A grid board and small toy
@@ -4001,7 +4001,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Parker Brothers Master Merlin
- * TMS1400 MP7351-N2LL (die labeled 1400CR MP7351)
+ * TMS1400 MP7351-N2LL (die label 1400CR MP7351)
* 11 LEDs behind buttons, 3-level sound
The TMS1400CR MCU has the same pinout as a standard TMS1100. The hardware
@@ -4065,7 +4065,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Parker Brothers Stop Thief, by Bob Doyle
- * TMS0980NLL MP6101B (die labeled 0980B-01A)
+ * TMS0980NLL MP6101B (die label 0980B-01A)
* 3-digit 7seg LED display, 6-level sound
Stop Thief is actually a board game, the electronic device emulated here
@@ -4182,7 +4182,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Parker Brothers Bank Shot (known as Cue Ball in the UK), by Garry Kitchen
- * TMS1400NLL MP7313-N2 (die labeled MP7313)
+ * TMS1400NLL MP7313-N2 (die label MP7313)
* LED grid display, 1-bit sound
Bank Shot is an electronic pool game. To select a game, repeatedly press
@@ -4289,7 +4289,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Parker Brothers Split Second
- * TMS1400NLL MP7314-N2 (die labeled MP7314)
+ * TMS1400NLL MP7314-N2 (die label MP7314)
* LED grid display(default round LEDs, and rectangular shape ones), 1-bit sound
This is an electronic handheld reflex gaming device, it's straightforward
@@ -4401,7 +4401,7 @@ MACHINE_CONFIG_END
Parker Brothers Lost Treasure - The Electronic Deep-Sea Diving Game,
Featuring The Electronic Dive-Control Center
- * TMS1100 M34038-NLL (die labeled 1100E, M34038)
+ * TMS1100 M34038-NLL (die label 1100E, M34038)
* 11 LEDs, 4-bit sound
This is a board game. The electronic accessory is the emulated part here.
@@ -4516,7 +4516,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Tandy Radio Shack Computerized Arcade (1981, 1982, 1995)
- * TMS1100 MCU, labeled CD7282SL
+ * TMS1100 MCU, label CD7282SL
* 12 lamps behind buttons, 1-bit sound
This handheld contains 12 minigames. It looks and plays like "Fabulous Fred"
@@ -4677,7 +4677,7 @@ MACHINE_CONFIG_END
Tomy(tronics) Break Up (manufactured in Japan)
* PCB label TOMY B.O.
- * TMS1040 MP2726 TOMY WIPE (die labeled MP2726A)
+ * TMS1040 MP2726 TOMY WIPE (die label MP2726A)
* TMS1025N2LL I/O expander
* 2-digit 7seg display, 46 other leds, 1-bit sound
@@ -4879,7 +4879,7 @@ MACHINE_CONFIG_END
Tomy Power House Pinball
* PCB label TOMY P-B
- * TMS1100 MP1180 TOMY PINB (die labeled MP1180)
+ * TMS1100 MP1180 TOMY PINB (die label MP1180)
* 3 7seg LEDs, and other LEDs behind bezel, 1-bit sound
known releases:
diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp
index 6d1368f63bc..e607444ad64 100644
--- a/src/mame/drivers/hh_ucom4.cpp
+++ b/src/mame/drivers/hh_ucom4.cpp
@@ -231,7 +231,7 @@ UINT8 hh_ucom4_state::read_inputs(int columns)
Bambino UFO Master-Blaster Station (manufactured in Japan)
* PCB label Emix Corp. ET-02
- * NEC uCOM-44 MCU, labeled EMIX D552C 017
+ * NEC uCOM-44 MCU, label EMIX D552C 017
* cyan VFD display Emix-101, with blue color overlay
This is Bambino's first game, it is not known if ET-01 exists. Emix Corp.
@@ -345,7 +345,7 @@ MACHINE_CONFIG_END
Bambino Superstar Football (manufactured in Japan)
* PCB label Emix Corp. ET-03
- * NEC uCOM-43 MCU, labeled D553C 031
+ * NEC uCOM-43 MCU, label D553C 031
* cyan VFD display Emix-102, with bezel
The game was rereleased in 1982 as Classic Football, with an improved VFD.
@@ -485,7 +485,7 @@ MACHINE_CONFIG_END
Bambino Kick The Goal Soccer
* PCB label Emix Corp. ET-10/08 (PCB is for 2 possible games)
- * NEC uCOM-44 MCU, labeled D552C 043
+ * NEC uCOM-44 MCU, label D552C 043
* cyan VFD display Emix-105, with bezel overlay
Press the Display button twice to start the game. Action won't start until
@@ -609,7 +609,7 @@ MACHINE_CONFIG_END
Bambino Safari (manufactured in Japan)
* PCB label Emix Corp. ET-11
- * NEC uCOM-44 MCU, labeled EMIX D552C 049
+ * NEC uCOM-44 MCU, label EMIX D552C 049
* cyan VFD display Emix-108
NOTE!: MAME external artwork is required
@@ -713,7 +713,7 @@ MACHINE_CONFIG_END
Bambino Space Laser Fight (manufactured in Japan)
* PCB label Emix Corp. ET-12
- * NEC uCOM-43 MCU, labeled D553C 055
+ * NEC uCOM-43 MCU, label D553C 055
* cyan VFD display Emix-104, with blue or green color overlay
This is basically a revamp of their earlier Boxing game (ET-06), case and
@@ -863,7 +863,7 @@ MACHINE_CONFIG_END
Bandai Crazy Climber (manufactured in Japan)
* PCB labels SM-020/SM-021
- * NEC uCOM-43 MCU, labeled D553C 170
+ * NEC uCOM-43 MCU, label D553C 170
* cyan/red/green VFD display NEC FIP6AM2-T no. 1-8 2, with partial color overlay and bezel
known releases:
@@ -962,7 +962,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Castle Toy Tactix
- * NEC uCOM-43 MCU, labeled D557LC 512
+ * NEC uCOM-43 MCU, label D557LC 512
* 16 LEDs behind buttons
Tactix is similar to Merlin, for 1 or 2 players. In 2-player mode, simply
@@ -1080,7 +1080,7 @@ MACHINE_CONFIG_END
Epoch Invader From Space (manufactured in Japan)
* PCB labels 36010(A/B)
- * NEC uCOM-44 MCU, labeled D552C 054
+ * NEC uCOM-44 MCU, label D552C 054
* cyan VFD display NEC FIP9AM18T tube no. 0D, with color overlay
known releases:
@@ -1179,7 +1179,7 @@ MACHINE_CONFIG_END
Epoch Electronic Football (manufactured in Japan)
* PCB labels 36020(A/B/C)
- * NEC uCOM-43 MCU, labeled D553C 080
+ * NEC uCOM-43 MCU, label D553C 080
* cyan VFD display NEC FIP10AM15T tube no. 0F, with bezel overlay
known releases:
@@ -1288,7 +1288,7 @@ MACHINE_CONFIG_END
Epoch Galaxy II (manufactured in Japan)
* PCB labels 19096/96062
- * NEC uCOM-43 MCU, labeled D553C 153
+ * NEC uCOM-43 MCU, label D553C 153
* cyan/red VFD display NEC FIP10xM20T, with color overlay. x = multiple VFD
revisions exist, with different graphics: rev B no. 1-8, rev. D no. 2-21.
@@ -1389,7 +1389,7 @@ MACHINE_CONFIG_END
Epoch Astro Command (manufactured in Japan)
* PCB labels 96111/96112
- * NEC uCOM-43 MCU, labeled D553C 202
+ * NEC uCOM-43 MCU, label D553C 202
* cyan/red VFD display NEC FIP9AM20T no. 42-42, with color overlay + bezel
known releases:
@@ -1496,7 +1496,7 @@ MACHINE_CONFIG_END
Epoch Dracula (manufactured in Japan)
* PCB label 96121
- * NEC uCOM-43 MCU, labeled D553C 206
+ * NEC uCOM-43 MCU, label D553C 206
* cyan/red/green VFD display NEC FIP8BM20T no. 2-42
known releases:
@@ -1588,7 +1588,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Mattel Computer Gin
- * NEC uCOM-43 MCU, labeled D650C 060
+ * NEC uCOM-43 MCU, label D650C 060
***************************************************************************/
@@ -1662,7 +1662,7 @@ MACHINE_CONFIG_END
Mego Mini-Vid Break Free (manufactured in Japan)
* PCB label Mego 79 rev F
- * NEC uCOM-43 MCU, labeled D553C 049
+ * NEC uCOM-43 MCU, label D553C 049
* cyan VFD display Futaba DM-4.5 91
note: MAME external artwork is not needed for this game
@@ -1766,8 +1766,8 @@ MACHINE_CONFIG_END
/***************************************************************************
Tomy(tronic) Cosmic Combat (manufactured in Japan)
- * PCBs are labeled 2E1019-E01
- * NEC uCOM-44 MCU, labeled D552C 042
+ * PCB label 2E1019-E01
+ * NEC uCOM-44 MCU, label D552C 042
* cyan VFD display NEC FIP32AM18Y tube no. 0E, with color overlay
known releases:
@@ -1861,8 +1861,8 @@ MACHINE_CONFIG_END
/***************************************************************************
Tomy(tronic) Tennis (manufactured in Japan)
- * PCB labeled TOMY TN-04 TENNIS
- * NEC uCOM-44 MCU, labeled D552C 048
+ * PCB label TOMY TN-04 TENNIS
+ * NEC uCOM-44 MCU, label D552C 048
* VFD display NEC FIP11AM15T tube no. 0F, with overlay
The initial release of this game was in 1979, known as Pro-Tennis,
@@ -2017,8 +2017,8 @@ MACHINE_CONFIG_END
/***************************************************************************
Tomy(tronic) Pac-Man (manufactured in Japan)
- * PCBs are labeled TN-08 2E108E01
- * NEC uCOM-43 MCU, labeled D553C 160
+ * PCB label TN-08 2E108E01
+ * NEC uCOM-43 MCU, label D553C 160
* cyan/red/green VFD display NEC FIP8AM18T no. 2-21
* bright yellow round casing
@@ -2123,8 +2123,8 @@ MACHINE_CONFIG_END
/***************************************************************************
Tomy(tronic) Scramble (manufactured in Japan)
- * PCBs are labeled TN-10 2E114E01
- * NEC uCOM-43 MCU, labeled D553C 192
+ * PCB label TN-10 2E114E01
+ * NEC uCOM-43 MCU, label D553C 192
* cyan/red/green VFD display NEC FIP10CM20T no. 2-41
known releases:
@@ -2223,8 +2223,8 @@ MACHINE_CONFIG_END
/***************************************************************************
Tomy(tronic) Caveman (manufactured in Japan)
- * PCBs are labeled TN-12 2E114E03
- * NEC uCOM-43 MCU, labeled D553C 209
+ * PCB label TN-12 2E114E03
+ * NEC uCOM-43 MCU, label D553C 209
* cyan/red/green VFD display NEC FIP8AM20T no. 2-42
known releases:
@@ -2319,8 +2319,8 @@ MACHINE_CONFIG_END
/***************************************************************************
Tomy Alien Chase (manufactured in Japan)
- * PCBs are labeled TN-16 2E121B01
- * NEC uCOM-43 MCU, labeled D553C 258
+ * PCB label TN-16 2E121B01
+ * NEC uCOM-43 MCU, label D553C 258
* red/green VFD display NEC FIP9AM24T, with color overlay, 2-sided*
*Player one views the VFD from the front (grid+filament side) while the
diff --git a/src/mame/drivers/ibmpc.cpp b/src/mame/drivers/ibmpc.cpp
index f49d500e829..3df1c92edaf 100644
--- a/src/mame/drivers/ibmpc.cpp
+++ b/src/mame/drivers/ibmpc.cpp
@@ -258,9 +258,6 @@ XT U44 IBM.bin: IBM 5160 PC/XT Bank-selection decoding ROM (256x4 bit). Not mapp
#include "emu.h"
#include "cpu/i86/i86.h"
#include "machine/ram.h"
-#include "bus/isa/isa.h"
-#include "bus/isa/isa_cards.h"
-#include "machine/pc_lpt.h"
#include "bus/pc_kbd/keyboards.h"
#include "includes/genpc.h"
#include "softlist.h"
@@ -277,30 +274,18 @@ public:
static ADDRESS_MAP_START( pc8_map, AS_PROGRAM, 8, ibmpc_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(pc8_io, AS_IO, 8, ibmpc_state )
ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", ibm5160_mb_device, map)
ADDRESS_MAP_END
-static INPUT_PORTS_START( ibm5150 )
-INPUT_PORTS_END
-
static DEVICE_INPUT_DEFAULTS_START(cga)
DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x20)
DEVICE_INPUT_DEFAULTS_END
-//static DEVICE_INPUT_DEFAULTS_START(ega)
-// DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x00)
-//DEVICE_INPUT_DEFAULTS_END
-
-
static MACHINE_CONFIG_START( ibm5150, ibmpc_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", I8088, XTAL_14_31818MHz/3)
@@ -323,6 +308,7 @@ static MACHINE_CONFIG_START( ibm5150, ibmpc_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K")
/* software lists */
MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150")
@@ -362,6 +348,7 @@ static MACHINE_CONFIG_START( ibm5160, ibmpc_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K")
/* software lists */
MCFG_SOFTWARE_LIST_ADD("pc_disk_list","ibm5150")
@@ -370,7 +357,7 @@ MACHINE_CONFIG_END
ROM_START( ibm5150 )
- ROM_REGION(0x100000,"maincpu", 0)
+ ROM_REGION(0x10000,"bios", 0)
// ROM_LOAD("600963.u12", 0xc8000, 0x02000, CRC(f3daf85f) SHA1(3bd29538832d3084cbddeec92593988772755283)) /* Tandon/Western Digital Fixed Disk Adapter 600963-001__TYPE_5.U12.2764.bin - Meant for an IBM PC or XT which lacked bios support for HDDs */
/* Xebec 1210 and 1220 Z80-based ST409/ST412 MFM controllers */
@@ -383,27 +370,27 @@ ROM_START( ibm5150 )
ROM_DEFAULT_BIOS( "rev3" )
ROM_SYSTEM_BIOS( 0, "rev3", "IBM PC 5150 1501476 10/27/82" )
- ROMX_LOAD("5000019.u29", 0xf6000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9), ROM_BIOS(1)) /* ROM Basic 1.1 F6000-F7FFF; IBM P/N: 5000019, FRU: 6359109 */
- ROMX_LOAD("5000021.u30", 0xf8000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731), ROM_BIOS(1)) /* ROM Basic 1.1 F8000-F9FFF; IBM P/N: 5000021, FRU: 6359111 */
- ROMX_LOAD("5000022.u31", 0xfa000, 0x2000, CRC(aac3fc37) SHA1(c9e0529470edf04da093bb8c8ae2536c688c1a74), ROM_BIOS(1)) /* ROM Basic 1.1 FA000-FBFFF; IBM P/N: 5000022, FRU: 6359112 */
- ROMX_LOAD("5000023.u32", 0xfc000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7), ROM_BIOS(1)) /* ROM Basic 1.1 FC000-FDFFF; IBM P/N: 5000023, FRU: 6359113 */
- ROMX_LOAD("1501476.u33", 0xfe000, 0x2000, CRC(e88792b3) SHA1(40fce6a94dda4328a8b608c7ae2f39d1dc688af4), ROM_BIOS(1))
+ ROMX_LOAD("5000019.u29", 0x6000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9), ROM_BIOS(1)) /* ROM Basic 1.1 F6000-F7FFF; IBM P/N: 5000019, FRU: 6359109 */
+ ROMX_LOAD("5000021.u30", 0x8000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731), ROM_BIOS(1)) /* ROM Basic 1.1 F8000-F9FFF; IBM P/N: 5000021, FRU: 6359111 */
+ ROMX_LOAD("5000022.u31", 0xa000, 0x2000, CRC(aac3fc37) SHA1(c9e0529470edf04da093bb8c8ae2536c688c1a74), ROM_BIOS(1)) /* ROM Basic 1.1 FA000-FBFFF; IBM P/N: 5000022, FRU: 6359112 */
+ ROMX_LOAD("5000023.u32", 0xc000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7), ROM_BIOS(1)) /* ROM Basic 1.1 FC000-FDFFF; IBM P/N: 5000023, FRU: 6359113 */
+ ROMX_LOAD("1501476.u33", 0xe000, 0x2000, CRC(e88792b3) SHA1(40fce6a94dda4328a8b608c7ae2f39d1dc688af4), ROM_BIOS(1))
/* IBM PC 5150 (rev 1: 04/24/81) 2-screw case 16-64k MB w/MDA Card, ROM Basic 1.0 */
ROM_SYSTEM_BIOS( 1, "rev1", "IBM PC 5150 5700051 04/24/81" )
- ROMX_LOAD("5700019.u29", 0xf6000, 0x2000, CRC(b59e8f6c) SHA1(7a5db95370194c73b7921f2d69267268c69d2511), ROM_BIOS(2)) /* ROM Basic 1.0 F6000-F7FFF */
- ROMX_LOAD("5700027.u30", 0xf8000, 0x2000, CRC(bfff99b8) SHA1(ca2f126ba69c1613b7b5a4137d8d8cf1db36a8e6), ROM_BIOS(2)) /* ROM Basic 1.0 F8000-F9FFF */
- ROMX_LOAD("5700035.u31", 0xfa000, 0x2000, CRC(9fe4ec11) SHA1(89af8138185938c3da3386f97d3b0549a51de5ef), ROM_BIOS(2)) /* ROM Basic 1.0 FA000-FBFFF */
- ROMX_LOAD("5700043.u32", 0xfc000, 0x2000, CRC(ea2794e6) SHA1(22fe58bc853ffd393d5e2f98defda7456924b04f), ROM_BIOS(2)) /* ROM Basic 1.0 FC000-FDFFF */
- ROMX_LOAD("5700051.u33", 0xfe000, 0x2000, CRC(12d33fb8) SHA1(f046058faa016ad13aed5a082a45b21dea43d346), ROM_BIOS(2))
+ ROMX_LOAD("5700019.u29", 0x6000, 0x2000, CRC(b59e8f6c) SHA1(7a5db95370194c73b7921f2d69267268c69d2511), ROM_BIOS(2)) /* ROM Basic 1.0 F6000-F7FFF */
+ ROMX_LOAD("5700027.u30", 0x8000, 0x2000, CRC(bfff99b8) SHA1(ca2f126ba69c1613b7b5a4137d8d8cf1db36a8e6), ROM_BIOS(2)) /* ROM Basic 1.0 F8000-F9FFF */
+ ROMX_LOAD("5700035.u31", 0xa000, 0x2000, CRC(9fe4ec11) SHA1(89af8138185938c3da3386f97d3b0549a51de5ef), ROM_BIOS(2)) /* ROM Basic 1.0 FA000-FBFFF */
+ ROMX_LOAD("5700043.u32", 0xc000, 0x2000, CRC(ea2794e6) SHA1(22fe58bc853ffd393d5e2f98defda7456924b04f), ROM_BIOS(2)) /* ROM Basic 1.0 FC000-FDFFF */
+ ROMX_LOAD("5700051.u33", 0xe000, 0x2000, CRC(12d33fb8) SHA1(f046058faa016ad13aed5a082a45b21dea43d346), ROM_BIOS(2))
/* IBM PC 5150 (rev 2: 10/19/81) 2-screw case, 16-64k MB w/MDA Card, ROM Basic 1.0 */
ROM_SYSTEM_BIOS( 2, "rev2", "IBM PC 5150 5700671 10/19/81" )
- ROMX_LOAD("5700019.u29", 0xf6000, 0x2000, CRC(b59e8f6c) SHA1(7a5db95370194c73b7921f2d69267268c69d2511), ROM_BIOS(3)) /* ROM Basic 1.0 F6000-F7FFF */
- ROMX_LOAD("5700027.u30", 0xf8000, 0x2000, CRC(bfff99b8) SHA1(ca2f126ba69c1613b7b5a4137d8d8cf1db36a8e6), ROM_BIOS(3)) /* ROM Basic 1.0 F8000-F9FFF */
- ROMX_LOAD("5700035.u31", 0xfa000, 0x2000, CRC(9fe4ec11) SHA1(89af8138185938c3da3386f97d3b0549a51de5ef), ROM_BIOS(3)) /* ROM Basic 1.0 FA000-FBFFF */
- ROMX_LOAD("5700043.u32", 0xfc000, 0x2000, CRC(ea2794e6) SHA1(22fe58bc853ffd393d5e2f98defda7456924b04f), ROM_BIOS(3)) /* ROM Basic 1.0 FC000-FDFFF */
- ROMX_LOAD("5700671.u33", 0xfe000, 0x2000, CRC(b7d4ec46) SHA1(bdb06f846c4768f39eeff7e16b6dbff8cd2117d2), ROM_BIOS(3))
+ ROMX_LOAD("5700019.u29", 0x6000, 0x2000, CRC(b59e8f6c) SHA1(7a5db95370194c73b7921f2d69267268c69d2511), ROM_BIOS(3)) /* ROM Basic 1.0 F6000-F7FFF */
+ ROMX_LOAD("5700027.u30", 0x8000, 0x2000, CRC(bfff99b8) SHA1(ca2f126ba69c1613b7b5a4137d8d8cf1db36a8e6), ROM_BIOS(3)) /* ROM Basic 1.0 F8000-F9FFF */
+ ROMX_LOAD("5700035.u31", 0xa000, 0x2000, CRC(9fe4ec11) SHA1(89af8138185938c3da3386f97d3b0549a51de5ef), ROM_BIOS(3)) /* ROM Basic 1.0 FA000-FBFFF */
+ ROMX_LOAD("5700043.u32", 0xc000, 0x2000, CRC(ea2794e6) SHA1(22fe58bc853ffd393d5e2f98defda7456924b04f), ROM_BIOS(3)) /* ROM Basic 1.0 FC000-FDFFF */
+ ROMX_LOAD("5700671.u33", 0xe000, 0x2000, CRC(b7d4ec46) SHA1(bdb06f846c4768f39eeff7e16b6dbff8cd2117d2), ROM_BIOS(3))
/* Z80 on the Xebec 1210 and 1220 Hard Disk Controllers */
// ROM_REGION(0x10000, "cpu1", 0)
@@ -415,29 +402,29 @@ ROM_START( ibm5150 )
ROM_LOAD("5788005.u33", 0x00000, 0x2000, CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) /* "AMI 8412PI // 5788005 // (C) IBM CORP. 1981 // KOREA" */
ROM_END
ROM_START( ibm5155 )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD("5000027.u19", 0xf0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05))
- ROM_LOAD("1501512.u18", 0xf8000, 0x8000, CRC(79522c3d) SHA1(6bac726d8d033491d52507278aa388ec04cf8b7e))
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD("5000027.u19", 0x0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05))
+ ROM_LOAD("1501512.u18", 0x8000, 0x8000, CRC(79522c3d) SHA1(6bac726d8d033491d52507278aa388ec04cf8b7e))
/* IBM 1501981(CGA) and 1501985(MDA) Character rom */
ROM_REGION(0x2000,"gfx1", 0)
ROM_LOAD("5788005.u33", 0x00000, 0x2000, CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) /* "AMI 8412PI // 5788005 // (C) IBM CORP. 1981 // KOREA" */
ROM_END
ROM_START( ibm5140 )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD("7396917.bin", 0xf0000, 0x08000, CRC(95c35652) SHA1(2bdac30715dba114fbe0895b8b4723f8dc26a90d))
- ROM_LOAD("7396918.bin", 0xf8000, 0x08000, CRC(1b4202b0) SHA1(4797ff853ba1675860f293b6368832d05e2f3ea9))
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD("7396917.bin", 0x0000, 0x08000, CRC(95c35652) SHA1(2bdac30715dba114fbe0895b8b4723f8dc26a90d))
+ ROM_LOAD("7396918.bin", 0x8000, 0x08000, CRC(1b4202b0) SHA1(4797ff853ba1675860f293b6368832d05e2f3ea9))
/* IBM 1501981(CGA) and 1501985(MDA) Character rom */
ROM_REGION(0x2000,"gfx1", 0)
ROM_LOAD("5788005.u33", 0x00000, 0x2000, CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) /* "AMI 8412PI // 5788005 // (C) IBM CORP. 1981 // KOREA" */
ROM_END
#ifdef UNUSED_DEFINITION
ROM_START( ibmpca )
- ROM_REGION(0x100000,"maincpu",0)
- ROM_LOAD("basicc11.f6", 0xf6000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9))
- ROM_LOAD("basicc11.f8", 0xf8000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731))
- ROM_LOAD("basicc11.fa", 0xfa000, 0x2000, CRC(aac3fc37) SHA1(c9e0529470edf04da093bb8c8ae2536c688c1a74))
- ROM_LOAD("basicc11.fc", 0xfc000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7))
- ROM_LOAD("pc081682.bin", 0xfe000, 0x2000, CRC(5c3f0256) SHA1(b42c78abd0a9c630a2f972ad2bae46d83c3a2a09))
+ ROM_REGION(0x10000,"bios",0)
+ ROM_LOAD("basicc11.f6", 0x6000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9))
+ ROM_LOAD("basicc11.f8", 0x8000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731))
+ ROM_LOAD("basicc11.fa", 0xa000, 0x2000, CRC(aac3fc37) SHA1(c9e0529470edf04da093bb8c8ae2536c688c1a74))
+ ROM_LOAD("basicc11.fc", 0xc000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7))
+ ROM_LOAD("pc081682.bin", 0xe000, 0x2000, CRC(5c3f0256) SHA1(b42c78abd0a9c630a2f972ad2bae46d83c3a2a09))
/* IBM 1501981(CGA) and 1501985(MDA) Character rom */
ROM_REGION(0x2000,"gfx1", 0)
@@ -447,7 +434,7 @@ ROM_END
ROM_START( ibm5160 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
// ROM_LOAD("600963.u12", 0xc8000, 0x02000, CRC(f3daf85f) SHA1(3bd29538832d3084cbddeec92593988772755283)) /* Tandon/Western Digital Fixed Disk Adapter 600963-001__TYPE_5.U12.2764.bin */
/* PC/3270 has a 3270 keyboard controller card, plus a rom on that card to tell the pc how to run it.
@@ -476,20 +463,20 @@ ROM_START( ibm5160 )
ROM_DEFAULT_BIOS( "rev4" )
ROM_SYSTEM_BIOS( 0, "rev1", "IBM XT 5160 08/16/82" ) /* ROM at u18 marked as BAD_DUMP for now, as current dump, while likely correct, was regenerated from a number of smaller dumps, and needs a proper redump. */
- ROMX_LOAD("5000027.u19", 0xf0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05), ROM_BIOS(1) )
- ROMX_LOAD("5000026.u18", 0xf8000, 0x8000, BAD_DUMP CRC(3c9b0ac3) SHA1(271c9f4cef5029a1560075550b67c3395db09fef), ROM_BIOS(1) ) /* This is probably a good dump, and works fine, but as it was manually regenerated based on a partial dump, it needs to be reverified. It's a very rare rom revision and may have only appeared on XT prototypes. */
+ ROMX_LOAD("5000027.u19", 0x0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05), ROM_BIOS(1) )
+ ROMX_LOAD("5000026.u18", 0x8000, 0x8000, BAD_DUMP CRC(3c9b0ac3) SHA1(271c9f4cef5029a1560075550b67c3395db09fef), ROM_BIOS(1) ) /* This is probably a good dump, and works fine, but as it was manually regenerated based on a partial dump, it needs to be reverified. It's a very rare rom revision and may have only appeared on XT prototypes. */
ROM_SYSTEM_BIOS( 1, "rev2", "IBM XT 5160 11/08/82" ) /* Same as PC 5155 BIOS and PC/3270 BIOS */
- ROMX_LOAD("5000027.u19", 0xf0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05), ROM_BIOS(2) ) /* silkscreen "MK37050N-4 // 5000027" - FRU: 6359116 - Contents repeat 4 times; Alt Silkscreen (from yesterpc.com): "(M) // 5000027 // (C) 1983 IBM CORP // X E // 8425B NM"*/
- ROMX_LOAD("1501512.u18", 0xf8000, 0x8000, CRC(79522c3d) SHA1(6bac726d8d033491d52507278aa388ec04cf8b7e), ROM_BIOS(2) ) /* silkscreen "MK38036N-25 // 1501512 // ZA // (C)IBM CORP // 1981,1983 // D MALAYSIA // 8438 AP"*/
+ ROMX_LOAD("5000027.u19", 0x0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05), ROM_BIOS(2) ) /* silkscreen "MK37050N-4 // 5000027" - FRU: 6359116 - Contents repeat 4 times; Alt Silkscreen (from yesterpc.com): "(M) // 5000027 // (C) 1983 IBM CORP // X E // 8425B NM"*/
+ ROMX_LOAD("1501512.u18", 0x8000, 0x8000, CRC(79522c3d) SHA1(6bac726d8d033491d52507278aa388ec04cf8b7e), ROM_BIOS(2) ) /* silkscreen "MK38036N-25 // 1501512 // ZA // (C)IBM CORP // 1981,1983 // D MALAYSIA // 8438 AP"*/
ROM_SYSTEM_BIOS( 2, "rev3", "IBM XT 5160 01/10/86" ) /* Has enhanced keyboard support and a 3.5" drive */
- ROMX_LOAD("62x0854.u19", 0xf0000, 0x8000, CRC(b5fb0e83) SHA1(937b43759ffd472da4fb0fe775b3842f5fb4c3b3), ROM_BIOS(3) )
- ROMX_LOAD("62x0851.u18", 0xf8000, 0x8000, CRC(1054f7bd) SHA1(e7d0155813e4c650085144327581f05486ed1484), ROM_BIOS(3) )
+ ROMX_LOAD("62x0854.u19", 0x0000, 0x8000, CRC(b5fb0e83) SHA1(937b43759ffd472da4fb0fe775b3842f5fb4c3b3), ROM_BIOS(3) )
+ ROMX_LOAD("62x0851.u18", 0x8000, 0x8000, CRC(1054f7bd) SHA1(e7d0155813e4c650085144327581f05486ed1484), ROM_BIOS(3) )
ROM_SYSTEM_BIOS( 3, "rev4", "IBM XT 5160 05/09/86" ) /* Minor bugfixes to keyboard code, supposedly */
- ROMX_LOAD("68x4370.u19", 0xf0000, 0x8000, CRC(758ff036) SHA1(045e27a70407d89b7956ecae4d275bd2f6b0f8e2), ROM_BIOS(4))
- ROMX_LOAD("62x0890.u18", 0xf8000, 0x8000, CRC(4f417635) SHA1(daa61762d3afdd7262e34edf1a3d2df9a05bcebb), ROM_BIOS(4))
+ ROMX_LOAD("68x4370.u19", 0x0000, 0x8000, CRC(758ff036) SHA1(045e27a70407d89b7956ecae4d275bd2f6b0f8e2), ROM_BIOS(4))
+ ROMX_LOAD("62x0890.u18", 0x8000, 0x8000, CRC(4f417635) SHA1(daa61762d3afdd7262e34edf1a3d2df9a05bcebb), ROM_BIOS(4))
// ROM_SYSTEM_BIOS( 4, "xtdiag", "IBM XT 5160 w/Supersoft Diagnostics" ) /* ROMs marked as BAD_DUMP for now. We expect the data to be in a different ROM chip layout */
// ROMX_LOAD("basicc11.f6", 0xf6000, 0x2000, BAD_DUMP CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9), ROM_BIOS(5) )
@@ -570,9 +557,7 @@ ROM_END
***************************************************************************/
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
-COMP( 1981, ibm5150, 0, 0, ibm5150, ibm5150, driver_device, 0, "International Business Machines", "IBM PC 5150" , 0)
-COMP( 1982, ibm5155, ibm5150, 0, ibm5150, ibm5150, driver_device, 0, "International Business Machines", "IBM PC 5155" , 0)
-COMP( 1985, ibm5140, ibm5150, 0, ibm5140, ibm5150, driver_device, 0, "International Business Machines", "IBM PC 5140 Convertible" , MACHINE_NOT_WORKING)
-
-// xt class (pc but 8086)
-COMP( 1982, ibm5160, ibm5150, 0, ibm5160, ibm5150, driver_device, 0, "International Business Machines", "IBM XT 5160" , 0)
+COMP( 1981, ibm5150, 0, 0, ibm5150, 0, driver_device, 0, "International Business Machines", "IBM PC 5150" , 0)
+COMP( 1982, ibm5155, ibm5150, 0, ibm5150, 0, driver_device, 0, "International Business Machines", "IBM PC 5155" , 0)
+COMP( 1985, ibm5140, ibm5150, 0, ibm5140, 0, driver_device, 0, "International Business Machines", "IBM PC 5140 Convertible" , MACHINE_NOT_WORKING)
+COMP( 1982, ibm5160, ibm5150, 0, ibm5160, 0, driver_device, 0, "International Business Machines", "IBM XT 5160" , 0)
diff --git a/src/mame/drivers/ibmpcjr.cpp b/src/mame/drivers/ibmpcjr.cpp
index f67bc071494..c06ead888be 100644
--- a/src/mame/drivers/ibmpcjr.cpp
+++ b/src/mame/drivers/ibmpcjr.cpp
@@ -118,7 +118,7 @@ DRIVER_INIT_MEMBER(pcjr_state, pcjr)
m_pc_int_delay_timer = timer_alloc(TIMER_IRQ_DELAY);
m_pcjr_watchdog = timer_alloc(TIMER_WATCHDOG);
m_keyb_signal_timer = timer_alloc(TIMER_KB_SIGNAL);
- membank( "bank10" )->set_base( m_ram->pointer() );
+ m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - 1, m_ram->pointer());
}
void pcjr_state::machine_reset()
@@ -533,20 +533,16 @@ GFXDECODE_END
static ADDRESS_MAP_START(ibmpcjr_map, AS_PROGRAM, 8, pcjr_state)
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xaffff) AM_RAM
- AM_RANGE(0xb0000, 0xb7fff) AM_NOP
- AM_RANGE(0xb8000, 0xbffff) AM_RAMBANK("bank14")
- AM_RANGE(0xc0000, 0xc7fff) AM_NOP
- AM_RANGE(0xc8000, 0xc9fff) AM_ROM
- AM_RANGE(0xca000, 0xcffff) AM_NOP
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0xb8000, 0xbffff) AM_DEVICE("pcvideo_pcjr:vram", address_map_bank_device, amap8)
AM_RANGE(0xd0000, 0xdffff) AM_DEVREAD("cartslot2", generic_slot_device, read_rom)
AM_RANGE(0xe0000, 0xeffff) AM_DEVREAD("cartslot1", generic_slot_device, read_rom)
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(ibmpcjr_io, AS_IO, 8, pcjr_state)
+ ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0020, 0x0021) AM_DEVREADWRITE("pic8259", pic8259_device, read, write)
AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE("pit8253", pit8253_device, read, write)
AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
@@ -561,11 +557,16 @@ static ADDRESS_MAP_START(ibmpcjr_io, AS_IO, 8, pcjr_state)
ADDRESS_MAP_END
static ADDRESS_MAP_START(ibmpcjx_map, AS_PROGRAM, 8, pcjr_state )
+ ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x80000, 0xb7fff) AM_ROM AM_REGION("kanji",0)
- AM_IMPORT_FROM( ibmpcjr_map )
+ AM_RANGE(0x80000, 0x9ffff) AM_RAM AM_SHARE("vram") // TODO: remove this part of vram hack
+ AM_RANGE(0xb8000, 0xbffff) AM_DEVICE("pcvideo_pcjr:vram", address_map_bank_device, amap8)
+ AM_RANGE(0xd0000, 0xdffff) AM_DEVREAD("cartslot1", generic_slot_device, read_rom)
+ AM_RANGE(0xe0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(ibmpcjx_io, AS_IO, 8, pcjr_state)
+ ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x01ff, 0x01ff) AM_READWRITE(pcjx_port_1ff_r, pcjx_port_1ff_w)
AM_IMPORT_FROM( ibmpcjr_io )
ADDRESS_MAP_END
@@ -650,6 +651,7 @@ static MACHINE_CONFIG_START( ibmpcjr, pcjr_state)
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("128K, 256K, 512K")
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","ibmpcjr_cart")
@@ -673,26 +675,30 @@ static MACHINE_CONFIG_DERIVED( ibmpcjx, ibmpcjr )
MCFG_SLOT_FIXED(true)
MCFG_GFXDECODE_MODIFY("gfxdecode", ibmpcjx)
-MACHINE_CONFIG_END
+ /* internal ram */
+ MCFG_DEVICE_MODIFY(RAM_TAG)
+ MCFG_RAM_DEFAULT_SIZE("512K")
+ MCFG_RAM_EXTRA_OPTIONS("") // only boots with 512k currently
+ MACHINE_CONFIG_END
ROM_START( ibmpcjr )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD("bios.rom", 0xf0000, 0x10000,CRC(31e3a7aa) SHA1(1f5f7013f18c08ff50d7942e76c4fbd782412414))
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD("bios.rom", 0x0000, 0x10000,CRC(31e3a7aa) SHA1(1f5f7013f18c08ff50d7942e76c4fbd782412414))
ROM_REGION(0x08100,"gfx1", 0)
ROM_LOAD("cga.chr", 0x00000, 0x01000, CRC(42009069) SHA1(ed08559ce2d7f97f68b9f540bddad5b6295294dd)) // from an unknown clone cga card
ROM_END
ROM_START( ibmpcjx )
- ROM_REGION(0x100000,"maincpu", ROMREGION_ERASEFF)
+ ROM_REGION(0x20000,"bios", ROMREGION_ERASEFF)
ROM_DEFAULT_BIOS("unk")
ROM_SYSTEM_BIOS( 0, "5601jda", "5601jda" )
- ROMX_LOAD("5601jda.bin", 0xf0000, 0x10000, CRC(b1e12366) SHA1(751feb16b985aa4f1ec1437493ff77e2ebd5e6a6), ROM_BIOS(1))
- ROMX_LOAD("basicjx.rom", 0xe8000, 0x08000, NO_DUMP, ROM_BIOS(1)) // boot fails due of this.
+ ROMX_LOAD("5601jda.bin", 0x10000, 0x10000, CRC(b1e12366) SHA1(751feb16b985aa4f1ec1437493ff77e2ebd5e6a6), ROM_BIOS(1))
+ ROMX_LOAD("basicjx.rom", 0x08000, 0x08000, NO_DUMP, ROM_BIOS(1)) // boot fails due of this.
ROM_SYSTEM_BIOS( 1, "unk", "unk" )
- ROMX_LOAD("ipljx.rom", 0xe0000, 0x20000, CRC(36a7b2de) SHA1(777db50c617725e149bca9b18cf51ce78f6dc548), ROM_BIOS(2))
+ ROMX_LOAD("ipljx.rom", 0x00000, 0x20000, CRC(36a7b2de) SHA1(777db50c617725e149bca9b18cf51ce78f6dc548), ROM_BIOS(2))
ROM_REGION(0x08100,"gfx1", 0) //TODO: needs a different charset
ROM_LOAD("cga.chr", 0x00000, 0x01000, BAD_DUMP CRC(42009069) SHA1(ed08559ce2d7f97f68b9f540bddad5b6295294dd)) // from an unknown clone cga card
diff --git a/src/mame/drivers/iskr103x.cpp b/src/mame/drivers/iskr103x.cpp
index 945415f676b..84273344fb5 100644
--- a/src/mame/drivers/iskr103x.cpp
+++ b/src/mame/drivers/iskr103x.cpp
@@ -41,28 +41,19 @@ public:
static ADDRESS_MAP_START( iskr1031_map, AS_PROGRAM, 16, iskr103x_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x7ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(iskr1031_io, AS_IO, 16, iskr103x_state)
ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ibm5160_mb_device, map, 0xffff)
ADDRESS_MAP_END
-static INPUT_PORTS_START( iskr1030m )
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( iskr1031 )
-INPUT_PORTS_END
-
static DEVICE_INPUT_DEFAULTS_START(iskr1030m)
- DEVICE_INPUT_DEFAULTS("DSW0", 0x31, 0x21)
+ DEVICE_INPUT_DEFAULTS("DSW0", 0x30, 0x20)
+ DEVICE_INPUT_DEFAULTS("DSW0", 0x01, 0x01)
DEVICE_INPUT_DEFAULTS_END
static DEVICE_INPUT_DEFAULTS_START(iskr1031)
@@ -92,48 +83,30 @@ static MACHINE_CONFIG_START( iskr1030m, iskr103x_state )
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( iskr1031, iskr103x_state )
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", I8086, 4772720)
- MCFG_CPU_PROGRAM_MAP(iskr1031_map)
- MCFG_CPU_IO_MAP(iskr1031_io)
- MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
-
- MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu")
+static MACHINE_CONFIG_DERIVED( iskr1031, iskr1030m )
+ MCFG_DEVICE_MODIFY("mb")
MCFG_DEVICE_INPUT_DEFAULTS(iskr1031)
-
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", iskr103x_isa8_cards, "cga_iskr1031", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", iskr103x_isa8_cards, "fdc_xt", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", iskr103x_isa8_cards, nullptr, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", iskr103x_isa8_cards, nullptr, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", iskr103x_isa8_cards, nullptr, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", iskr103x_isa8_cards, nullptr, false)
-
-// MCFG_SOFTWARE_LIST_ADD("flop_list", "iskr1031")
-
- MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_EC_1841)
-// MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_ISKR_1030)
-
- MCFG_RAM_ADD(RAM_TAG)
- MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_DEVICE_MODIFY("isa1")
+ MCFG_DEVICE_SLOT_INTERFACE(iskr103x_isa8_cards, "cga_iskr1031", false)
MACHINE_CONFIG_END
ROM_START( iskr1030m )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
- ROMX_LOAD( "iskra-1030m_0.rom", 0xfc000, 0x2000, CRC(0d698e19) SHA1(2fe117c9f4f8c4b59085d5a41f919d743c425fdd), ROM_SKIP(1))
- ROMX_LOAD( "iskra-1030m_1.rom", 0xfc001, 0x2000, CRC(fe808337) SHA1(b0b7ebe14324ada8aa9a6926a82b18e80f78a257), ROM_SKIP(1))
+ ROM_REGION16_LE(0x10000,"bios", 0)
+ ROMX_LOAD( "iskra-1030m_0.rom", 0xc000, 0x2000, CRC(0d698e19) SHA1(2fe117c9f4f8c4b59085d5a41f919d743c425fdd), ROM_SKIP(1))
+ ROMX_LOAD( "iskra-1030m_1.rom", 0xc001, 0x2000, CRC(fe808337) SHA1(b0b7ebe14324ada8aa9a6926a82b18e80f78a257), ROM_SKIP(1))
ROM_END
ROM_START( iskr1031 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
ROM_SYSTEM_BIOS(0, "v1", "v1")
- ROMX_LOAD( "150-02.bin", 0xfc000, 0x2000, CRC(e33fb974) SHA1(f5f3ece67c025c0033716ff516e1a34fbeb32749), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "150-03.bin", 0xfc001, 0x2000, CRC(8c482258) SHA1(90ef48955e0df556dc06a000a797ef42ccf430c5), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "150-02.bin", 0xc000, 0x2000, CRC(e33fb974) SHA1(f5f3ece67c025c0033716ff516e1a34fbeb32749), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "150-03.bin", 0xc001, 0x2000, CRC(8c482258) SHA1(90ef48955e0df556dc06a000a797ef42ccf430c5), ROM_SKIP(1) | ROM_BIOS(1))
ROM_SYSTEM_BIOS(1, "v2", "v2")
- ROMX_LOAD( "150-06.bin", 0xfc000, 0x2000, CRC(1adbf969) SHA1(08c0a0fc50a75e6207b1987bae389cca60893eac), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "150-07.bin", 0xfc001, 0x2000, CRC(0dc4b65a) SHA1(c96f066251a7343eac8113ea9dcb2cb12d0334d5), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "150-06.bin", 0xc000, 0x2000, CRC(1adbf969) SHA1(08c0a0fc50a75e6207b1987bae389cca60893eac), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "150-07.bin", 0xc001, 0x2000, CRC(0dc4b65a) SHA1(c96f066251a7343eac8113ea9dcb2cb12d0334d5), ROM_SKIP(1) | ROM_BIOS(2))
ROM_END
/***************************************************************************
@@ -143,5 +116,5 @@ ROM_END
***************************************************************************/
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
-COMP ( 1989, iskr1030m, ibm5150, 0, iskr1030m, iskr1030m, driver_device, 0, "Schetmash", "Iskra 1030M", MACHINE_NOT_WORKING)
-COMP ( 1989, iskr1031, ibm5150, 0, iskr1031, iskr1031, driver_device, 0, "<unknown>", "Iskra 1031", 0)
+COMP ( 1989, iskr1030m, ibm5150, 0, iskr1030m, 0, driver_device, 0, "Schetmash", "Iskra 1030M", MACHINE_NOT_WORKING)
+COMP ( 1989, iskr1031, ibm5150, 0, iskr1031, 0, driver_device, 0, "<unknown>", "Iskra 1031", 0)
diff --git a/src/mame/drivers/lg-dvd.cpp b/src/mame/drivers/lg-dvd.cpp
index 0ea3c2ad14a..013d856febb 100644
--- a/src/mame/drivers/lg-dvd.cpp
+++ b/src/mame/drivers/lg-dvd.cpp
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Olivier Galibert
/*
Rather skeleton driver for a LG GP40NW10 usb dvd writer.
diff --git a/src/mame/drivers/m24.cpp b/src/mame/drivers/m24.cpp
index a055e1df881..7e34eeaa16b 100644
--- a/src/mame/drivers/m24.cpp
+++ b/src/mame/drivers/m24.cpp
@@ -4,8 +4,6 @@
#include "cpu/i86/i86.h"
#include "cpu/tms7000/tms7000.h"
-#include "bus/isa/isa.h"
-#include "bus/isa/isa_cards.h"
#include "machine/m24_kbd.h"
#include "machine/m24_z8000.h"
#include "machine/mm58274c.h"
@@ -165,9 +163,7 @@ WRITE_LINE_MEMBER(m24_state::halt_i86_w)
static ADDRESS_MAP_START( m24_map, AS_PROGRAM, 16, m24_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xeffff) AM_NOP
- AM_RANGE(0xf8000, 0xfffff) AM_ROM AM_REGION("maincpu", 0)
+ AM_RANGE(0xf8000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(m24_io, AS_IO, 16, m24_state )
@@ -175,6 +171,7 @@ static ADDRESS_MAP_START(m24_io, AS_IO, 16, m24_state )
AM_RANGE(0x0060, 0x0065) AM_READWRITE8(keyboard_r, keyboard_w, 0xffff)
AM_RANGE(0x0066, 0x0067) AM_READ_PORT("DSW0")
AM_RANGE(0x0070, 0x007f) AM_DEVREADWRITE8("mm58174an", mm58274c_device, read, write, 0xffff)
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", pc_noppi_mb_device, map, 0xffff)
AM_RANGE(0x80c0, 0x80c1) AM_DEVREADWRITE8("z8000_apb", m24_z8000_device, handshake_r, handshake_w, 0xff00)
ADDRESS_MAP_END
@@ -267,6 +264,7 @@ static MACHINE_CONFIG_START( olivetti, m24_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K")
MCFG_CPU_ADD("kbc", TMS7000, XTAL_4MHz)
MCFG_CPU_PROGRAM_MAP(kbc_map)
@@ -291,7 +289,7 @@ static MACHINE_CONFIG_START( olivetti, m24_state )
MACHINE_CONFIG_END
ROM_START( m24 )
- ROM_REGION16_LE(0x8000,"maincpu", 0)
+ ROM_REGION16_LE(0x8000,"bios", 0)
ROMX_LOAD("olivetti_m24_version_1.43_high.bin",0x4001, 0x2000, CRC(04e697ba) SHA1(1066dcc849e6289b5ac6372c84a590e456d497a6), ROM_SKIP(1))
ROMX_LOAD("olivetti_m24_version_1.43_low.bin", 0x4000, 0x2000, CRC(ff7e0f10) SHA1(13423011a9bae3f3193e8c199f98a496cab48c0f), ROM_SKIP(1))
@@ -300,7 +298,7 @@ ROM_START( m24 )
ROM_END
ROM_START( m240 )
- ROM_REGION16_LE(0x8000,"maincpu", 0)
+ ROM_REGION16_LE(0x8000,"bios", 0)
ROMX_LOAD("olivetti_m240_pch5_2.04_high.bin", 0x0001, 0x4000, CRC(ceb97b59) SHA1(84fabbeab355e0a4c9445910f2b7d1ec98886642), ROM_SKIP(1))
ROMX_LOAD("olivetti_m240_pch6_2.04_low.bin", 0x0000, 0x4000, CRC(c463aa94) SHA1(a30c763c1ace9f3ff79e7136b252d624108a50ae), ROM_SKIP(1))
diff --git a/src/mame/drivers/marinedt.cpp b/src/mame/drivers/marinedt.cpp
index 0f8e24b6199..73139b4b655 100644
--- a/src/mame/drivers/marinedt.cpp
+++ b/src/mame/drivers/marinedt.cpp
@@ -1,22 +1,9 @@
-// license:???
-// copyright-holders:insideoutboy
-/*
----------------------------
-Marine Date by TAITO (1981)
-MAME driver by insideoutboy
----------------------------
-a static underwater scene with obstacles in it, like seaweed,
-crabs and other stuff. You have a limited number of "strokes"
-per screen as well as a timer to work against. Your goal is
-to *bounce* yourself around the screen using *Strokes* on the
-trackball to try to reach a *female* octopus before you run out
-of strokes or time. You sort of bounce yourself around the screen
-like a billiard ball would bounce, but once in a while bubbles
-and other stuff will come up from underneath you and carry you
-away from where you are trying to get. When you reach your goal
-you get another more difficult screen, etc.
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
--------------------------------------------------------------------------
+// **** SKELETON DRIVER **** original removed due to unresolved licensing.
+
+/*
Marine Date
Taito 1981
@@ -108,657 +95,26 @@ Notes:
Top and Middle PCBs are plugged in with the solder-sides together.
Lower PCB is plugged in with components facing up.
-------------------------------------------------------------------------
-
-todo:
-in cocktail mopde p1 is flipped
-after inking the shark on the far right octi was moved to goal?
-for the colours, goal has to be black otherwise it would register
- as a hit, is goal pen 0 or 6?
-rom writes when finishing a game
- worth looking at before the collision is correct?
-playing dot hit when eaten by a shark?
-dont use any ints, s/b UINT8?
-enemy sprite not disabled at end of game
-tilemap
-palette may only be around 4 colours
- is 14 the palette?
-how do you know if you've got any ink left?
-prom 14 is the top bits? 4 bpp? or so?
-why is level 37 chosen?
-should it be 30fps?
- check other taito games of the time
-look at other taito 1981 games for ideas on the ports
- bking
- jhunt?
-"Marine Deto" or "Marine Date"
- look in the roms for all the text
-simplify gfx decode
-why does the player sprite need 4 colours?
- check if more than 1 are used
-check service test ram wipes for confirmation of ram spots
- anything after trackball test?
-obj1 to obj2 draw order
-2nd trackball
-flip/cocktail issues
-
-done:
-timer?
- you get 200 for each shot, don't think it's actually a timer
-have I been using x/y consistently, i.e. non rotated or rotated origin?
- yes, seems to be best using xy raw (i.e. non-rotated)
-p2 ink doesn't always light up in test mode
- after p1 ink pressed, p2 ink doesn't light up
- this is correct behavior if DSW set as Upright mode
*/
#include "emu.h"
-#include "cpu/z80/z80.h"
class marinedt_state : public driver_device
{
public:
marinedt_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_tx_tileram(*this, "tx_tileram"),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
-
- /* memory pointers */
- required_shared_ptr<UINT8> m_tx_tileram;
-
- /* video-related */
- std::unique_ptr<bitmap_ind16> m_tile;
- std::unique_ptr<bitmap_ind16> m_obj1;
- std::unique_ptr<bitmap_ind16> m_obj2;
- tilemap_t *m_tx_tilemap;
-
- UINT8 m_obj1_a;
- UINT8 m_obj1_x;
- UINT8 m_obj1_y;
- UINT8 m_obj2_a;
- UINT8 m_obj2_x;
- UINT8 m_obj2_y;
- UINT8 m_pd;
- UINT8 m_pf;
- UINT8 m_music;
- UINT8 m_sound;
- UINT8 m_coll;
- UINT8 m_cx;
- UINT8 m_cyr;
- UINT8 m_cyq;
- UINT8 m_collh;
- UINT8 m_cxh;
- UINT8 m_cyrh;
- UINT8 m_cyqh;
- DECLARE_WRITE8_MEMBER(tx_tileram_w);
- DECLARE_READ8_MEMBER(marinedt_port1_r);
- DECLARE_READ8_MEMBER(marinedt_coll_r);
- DECLARE_READ8_MEMBER(marinedt_obj1_x_r);
- DECLARE_READ8_MEMBER(marinedt_obj1_yr_r);
- DECLARE_READ8_MEMBER(marinedt_obj1_yq_r);
- DECLARE_WRITE8_MEMBER(marinedt_obj1_a_w);
- DECLARE_WRITE8_MEMBER(marinedt_obj1_x_w);
- DECLARE_WRITE8_MEMBER(marinedt_obj1_y_w);
- DECLARE_WRITE8_MEMBER(marinedt_obj2_a_w);
- DECLARE_WRITE8_MEMBER(marinedt_obj2_x_w);
- DECLARE_WRITE8_MEMBER(marinedt_obj2_y_w);
- DECLARE_WRITE8_MEMBER(marinedt_music_w);
- DECLARE_WRITE8_MEMBER(marinedt_sound_w);
- DECLARE_WRITE8_MEMBER(marinedt_pd_w);
- DECLARE_WRITE8_MEMBER(marinedt_pf_w);
- TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(marinedt);
- UINT32 screen_update_marinedt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
+ : driver_device(mconfig, type, tag)
+ { }
};
-WRITE8_MEMBER(marinedt_state::tx_tileram_w)
-{
- m_tx_tileram[offset] = data;
- m_tx_tilemap->mark_tile_dirty(offset);
-}
-
-READ8_MEMBER(marinedt_state::marinedt_port1_r)
-{
- //might need to be reversed for cocktail stuff
-
- /* x/y multiplexed */
- return ioport(((m_pf & 0x08) >> 3) ? "TRACKY" : "TRACKX")->read();
-}
-
-READ8_MEMBER(marinedt_state::marinedt_coll_r)
-{
- //76543210
- //x------- obj1 to obj2 collision
- //-xxx---- unused
- //----x--- obj1 to playfield collision
- //-----xxx unused
-
- return m_coll | m_collh;
-}
-
-//are these returning only during a collision?
-//I'd imagine they are returning the pf char where the collision took place?
-//what about where there is lots of collisions?
-//maybe the first on a scanline basis
-READ8_MEMBER(marinedt_state::marinedt_obj1_x_r)
-{
- //76543210
- //xxxx---- unknown
- //----xxxx x pos in tile ram
-
- UINT8 *RAM = memregion("maincpu")->base();
-
- if (RAM[0x430e])
- --m_cx;
- else
- ++m_cx;
-
- //figure out why inc/dec based on 430e?
- return m_cx | (m_cxh << 4);
-}
-
-READ8_MEMBER(marinedt_state::marinedt_obj1_yr_r)
-{
- //76543210
- //xxxx---- unknown
- //----xxxx row in current screen quarter
-
-
- //has to be +1 if cx went over?
- if (m_cx == 0x10)
- m_cyr++;
-
- return m_cyr | (m_cyrh << 4);
-}
-
-READ8_MEMBER(marinedt_state::marinedt_obj1_yq_r)
-{
- //76543210
- //xx------ unknown
- //--xx---- screen quarter when flipped?
- //----xx-- unknown
- //------xx screen quarter
-
- return m_cyq | (m_cyqh << 4);
-}
-
-WRITE8_MEMBER(marinedt_state::marinedt_obj1_a_w){ m_obj1_a = data; }
-WRITE8_MEMBER(marinedt_state::marinedt_obj1_x_w){ m_obj1_x = data; }
-WRITE8_MEMBER(marinedt_state::marinedt_obj1_y_w){ m_obj1_y = data; }
-WRITE8_MEMBER(marinedt_state::marinedt_obj2_a_w){ m_obj2_a = data; }
-WRITE8_MEMBER(marinedt_state::marinedt_obj2_x_w){ m_obj2_x = data; }
-WRITE8_MEMBER(marinedt_state::marinedt_obj2_y_w){ m_obj2_y = data; }
-
-WRITE8_MEMBER(marinedt_state::marinedt_music_w){ m_music = data; }
-
-WRITE8_MEMBER(marinedt_state::marinedt_sound_w)
-{
- //76543210
- //xx------ ??
- //--x----- jet sound
- //---x---- foam
- //----x--- ink
- //-----x-- collision
- //------x- dots hit
- //-------x ??
-
- m_sound = data;
-}
-
-WRITE8_MEMBER(marinedt_state::marinedt_pd_w)
-{
- //76543210
- //xxx----- ?? unused
- //---x---- ?? the rest should be used based on the table
- //----x--- ??
- //-----x-- ??
- //------x- obj2 enable
- //-------x obj1 enable
-
- m_pd = data;
-}
-
-/*
-upright
-marinedt_pf_w: 00 // upright
-marinedt_pf_w: 01 // ??
-
-cocktail
-marinedt_pf_w: 02 // cocktail
-marinedt_pf_w: 03 // ??
-
-marinedt_pf_w: 01 // upright
-marinedt_pf_w: 05 // flip sprite?
-
-marinedt_pf_w: 07 // cocktail
-marinedt_pf_w: 03 // non-flip sprite?
-*/
-WRITE8_MEMBER(marinedt_state::marinedt_pf_w)
-{
- //76543210
- //xxxx---- ?? unused (will need to understand table of written values)
- //----x--- xy trackball select
- //-----x-- ?? flip screen/controls
- //------x- ?? upright/cocktail
- //-------x ?? service mode (coin lockout??)
-
-
- //if ((m_pf & 0x07) != (data & 0x07))
- // osd_printf_debug("marinedt_pf_w: %02x\n", data & 0x07);
-
- if ((m_pf & 0x02) != (data & 0x02))
- {
- if (data & 0x02)
- osd_printf_debug("tile flip\n");
- else
- osd_printf_debug("tile non-flip\n");
-
- if (data & 0x02)
- m_tx_tilemap->set_flip(TILEMAP_FLIPX | TILEMAP_FLIPY);
- else
- m_tx_tilemap->set_flip(0);
- }
-
- m_pf = data;
-
- //if (data & 0xf0)
- // logerror("pf:%02x %d\n", m_pf);
- //logerror("pd:%02x %d\n", m_pd, m_screen->frame_number());
-
-}
-
-static ADDRESS_MAP_START( marinedt_map, AS_PROGRAM, 8, marinedt_state )
- AM_RANGE(0x0000, 0x37ff) AM_ROM
- AM_RANGE(0x4000, 0x43ff) AM_RAM
- AM_RANGE(0x4400, 0x47ff) AM_RAM //unused, vram mirror?
- AM_RANGE(0x4800, 0x4bff) AM_RAM_WRITE(tx_tileram_w) AM_SHARE("tx_tileram")
- AM_RANGE(0x4c00, 0x4c00) AM_WRITENOP //?? maybe off by one error
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( marinedt_io_map, AS_IO, 8, marinedt_state )
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW0") //dips coinage
- AM_RANGE(0x01, 0x01) AM_READ(marinedt_port1_r) //trackball xy muxed
- AM_RANGE(0x02, 0x02) AM_READWRITE(marinedt_obj1_x_r, marinedt_obj1_a_w)
- AM_RANGE(0x03, 0x03) AM_READ_PORT("IN0") AM_WRITE(marinedt_obj1_x_w)
- AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW1") AM_WRITE(marinedt_obj1_y_w)
- AM_RANGE(0x05, 0x05) AM_WRITE(marinedt_music_w)
- AM_RANGE(0x06, 0x06) AM_READWRITE(marinedt_obj1_yr_r, marinedt_sound_w)
- AM_RANGE(0x08, 0x08) AM_WRITE(marinedt_obj2_a_w)
- AM_RANGE(0x09, 0x09) AM_WRITE(marinedt_obj2_x_w)
- AM_RANGE(0x0a, 0x0a) AM_READWRITE(marinedt_obj1_yq_r, marinedt_obj2_y_w)
- AM_RANGE(0x0d, 0x0d) AM_WRITE(marinedt_pd_w)
- AM_RANGE(0x0e, 0x0e) AM_READWRITE(marinedt_coll_r, watchdog_reset_w)
- AM_RANGE(0x0f, 0x0f) AM_WRITE(marinedt_pf_w)
-ADDRESS_MAP_END
-
-
static INPUT_PORTS_START( marinedt )
- PORT_START("DSW0")
- PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_A ) )
- PORT_DIPSETTING( 0x0f, DEF_STR( 9C_1C ) )
- PORT_DIPSETTING( 0x0e, DEF_STR( 8C_1C ) )
- PORT_DIPSETTING( 0x0d, DEF_STR( 7C_1C ) )
- PORT_DIPSETTING( 0x0c, DEF_STR( 6C_1C ) )
- PORT_DIPSETTING( 0x0b, DEF_STR( 5C_1C ) )
- PORT_DIPSETTING( 0x0a, DEF_STR( 4C_1C ) )
- PORT_DIPSETTING( 0x09, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_4C ) )
- PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x05, DEF_STR( 1C_6C ) )
- PORT_DIPSETTING( 0x06, DEF_STR( 1C_7C ) )
- PORT_DIPSETTING( 0x07, DEF_STR( 1C_8C ) )
- PORT_DIPNAME( 0xf0, 0x00, DEF_STR( Coin_B ) )
- PORT_DIPSETTING( 0xf0, DEF_STR( 9C_1C ) )
- PORT_DIPSETTING( 0xe0, DEF_STR( 8C_1C ) )
- PORT_DIPSETTING( 0xd0, DEF_STR( 7C_1C ) )
- PORT_DIPSETTING( 0xc0, DEF_STR( 6C_1C ) )
- PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) )
- PORT_DIPSETTING( 0xa0, DEF_STR( 4C_1C ) )
- PORT_DIPSETTING( 0x90, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 1C_4C ) )
- PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x50, DEF_STR( 1C_6C ) )
- PORT_DIPSETTING( 0x60, DEF_STR( 1C_7C ) )
- PORT_DIPSETTING( 0x70, DEF_STR( 1C_8C ) )
-
- PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_TILT )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )
-
- PORT_START("DSW1")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Bonus_Life ) )
- PORT_DIPSETTING( 0x01, "5000" )
- PORT_DIPSETTING( 0x00, "10000" )
-//cheat?
- PORT_DIPNAME( 0x02, 0x00, "ignore internal bounce?" ) //maybe die / bounce off rocks & coral?
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x02, DEF_STR( On ) )
-//freezes the game before the reset
-//doesn't seem to be done as a dip, but what about mixing with dips like this?
- PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_DIPNAME( 0x10, 0x00, "Coin Chutes" )
- PORT_DIPSETTING( 0x00, "Common" )
- PORT_DIPSETTING( 0x10, "Individual" )
- PORT_DIPNAME( 0x20, 0x00, "Year Display" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x00, "3" )
- PORT_DIPSETTING( 0x40, "4" )
- PORT_DIPSETTING( 0x80, "5" )
- PORT_DIPSETTING( 0xc0, "6" )
-
- PORT_START("TRACKX") /* FAKE MUXED */
-//check all bits are used
- PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_REVERSE
-
- PORT_START("TRACKY") /* FAKE MUXED */
- PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10)
INPUT_PORTS_END
-static const gfx_layout marinedt_charlayout =
-{
- 8,8,
- RGN_FRAC(1,3),
- 3,
- { RGN_FRAC(2,3), RGN_FRAC(1,3), RGN_FRAC(0,3) }, //maybe 120
- { STEP8(0,1) },
- { STEP8(0,8) },
- 8*8
-};
-
-static const gfx_layout marinedt_objlayout =
-{
- 32,32,
- RGN_FRAC(1,1),
- 2,
- { 0, 4 },
- { STEP4(32*8*7,1), STEP4(32*8*6,1), STEP4(32*8*5,1), STEP4(32*8*4,1), STEP4(32*8*3,1), STEP4(32*8*2,1), STEP4(32*8*1,1), STEP4(32*8*0,1) },
- { STEP16(0,8), STEP16(16*8,8) },
- 32*32*2
-};
-
-static GFXDECODE_START( marinedt )
- GFXDECODE_ENTRY( "gfx1", 0, marinedt_charlayout, 0, 4 ) //really only 1 colour set?
- GFXDECODE_ENTRY( "gfx2", 0, marinedt_objlayout, 48, 4 )
- GFXDECODE_ENTRY( "gfx3", 0, marinedt_objlayout, 32, 4 )
-GFXDECODE_END
-
-PALETTE_INIT_MEMBER(marinedt_state, marinedt)
-{
- const UINT8 *color_prom = memregion("proms")->base();
- int i,r,b,g;
-
- for (i = 0; i < palette.entries(); i++)
- {
- int bit0, bit1, bit2;
-
- /* red component */
- bit0 = (~color_prom[i] >> 0) & 0x01;
- bit1 = (~color_prom[i] >> 1) & 0x01;
- bit2 = (~color_prom[i] >> 2) & 0x01;
-// *(palette++) = 0x92 * bit0 + 0x46 * bit1 + 0x27 * bit2;
- r = 0x27 * bit0 + 0x46 * bit1 + 0x92 * bit2;
- /* green component */
- bit0 = (~color_prom[i] >> 3) & 0x01;
- bit1 = (~color_prom[i] >> 4) & 0x01;
- bit2 = (~color_prom[i] >> 5) & 0x01;
-// *(palette++) = 0x92 * bit0 + 0x46 * bit1 + 0x27 * bit2;
- g = 0x27 * bit0 + 0x46 * bit1 + 0x92 * bit2;
- /* blue component */
- bit0 = (~color_prom[i] >> 5) & 0x01;
- bit1 = (~color_prom[i] >> 6) & 0x01;
- bit2 = (~color_prom[i] >> 7) & 0x01;
-bit0 = 0;
-// *(palette++) = 0x92 * bit0 + 0x46 * bit1 + 0x27 * bit2;
- b = 0x27 * bit0 + 0x46 * bit1 + 0x92 * bit2;
-
- palette.set_pen_color(i, rgb_t(r, g, b));
- }
-}
-
-
-TILE_GET_INFO_MEMBER(marinedt_state::get_tile_info)
-{
- int code = m_tx_tileram[tile_index];
- int color = 0;
- int flags = TILE_FLIPX;
-
- SET_TILE_INFO_MEMBER(0, code, color, flags);
-}
-
-void marinedt_state::video_start()
-{
- m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(marinedt_state::get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
-
- m_tx_tilemap->set_transparent_pen(0);
- m_tx_tilemap->set_scrolldx(0, 4*8);
- m_tx_tilemap->set_scrolldy(0, -4*8);
-
- m_tile = std::make_unique<bitmap_ind16>(32 * 8, 32 * 8);
- m_obj1 = std::make_unique<bitmap_ind16>(32, 32);
- m_obj2 = std::make_unique<bitmap_ind16>(32, 32);
-}
-
-
-// x------- flipy
-// -x------ unused ??
-// --xxx--- sprite code
-// -----x-- bank
-// ------xx colour
-
-#define OBJ_CODE(a) ((((a) & 0x04) << 1) + (((a) & 0x38) >> 3))
-#define OBJ_COLOR(a) ((a) & 0x03)
-#define OBJ_X(x) (256 - 32 - (x))
-#define OBJ_Y(y) (256 - 1 - (y))
-#define OBJ_FLIPX(a) ((m_pf & 0x02) == 0)
-#define OBJ_FLIPY(a) ((a) & 0x80)
-
-UINT32 marinedt_state::screen_update_marinedt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- int sx, sy;
-
- m_tile->fill(0);
- m_tx_tilemap->draw(screen, *m_tile, cliprect, 0, 0);
-
- m_obj1->fill(0);
- m_gfxdecode->gfx(1)->transpen(*m_obj1,m_obj1->cliprect(),
- OBJ_CODE(m_obj1_a),
- OBJ_COLOR(m_obj1_a),
- OBJ_FLIPX(m_obj1_a), OBJ_FLIPY(m_obj1_a),
- 0, 0, 0);
-
- m_obj2->fill(0);
- m_gfxdecode->gfx(2)->transpen(*m_obj2,m_obj2->cliprect(),
- OBJ_CODE(m_obj2_a),
- OBJ_COLOR(m_obj2_a),
- OBJ_FLIPX(m_obj2_a), OBJ_FLIPY(m_obj2_a),
- 0, 0, 0);
-
- bitmap.fill(0);
-
- if (m_pd & 0x02)
- copybitmap_trans(bitmap, *m_obj2, 0, 0, OBJ_X(m_obj2_x), OBJ_Y(m_obj2_y), cliprect, 0);
-
- if (m_pd & 0x01)
- copybitmap_trans(bitmap, *m_obj1, 0, 0, OBJ_X(m_obj1_x), OBJ_Y(m_obj1_y), cliprect, 0);
-
- copybitmap_trans(bitmap, *m_tile, 0, 0, 0, 0, cliprect, 0);
-
- m_coll = m_cx = m_cyr = m_cyq = 0;
- if (m_pd & 0x01)
- {
- for (sx = 0; sx < 32; sx++)
- for (sy = 0; sy < 32; sy++)
- {
- int x = OBJ_X(m_obj1_x) + sx;
- int y = OBJ_Y(m_obj1_y) + sy;
-
- if (!cliprect.contains(x, y))
- continue;
-
- if (m_obj1->pix16(sy, sx) == 0)
- continue;
-
- if (m_tile->pix16(y, x) != 0)
- {
- m_coll = 0x08;
-
- m_cx = (x % 128) / 8;
- m_cx &= 0x0f;
-
- m_cyr = ((y % 64) / 8) * 2 + (x > 127 ? 1 : 0);
- m_cyr &= 0x0f;
-
- m_cyq = y / 64;
- m_cyq &= 0x0f;
-
- break;
- }
- }
- }
-
- m_collh = m_cxh = m_cyrh = m_cyqh = 0;
- if ((m_pd & 0x03) == 0x03)
- {
- for (sx = 0; sx < 32; sx++)
- for (sy = 0; sy < 32; sy++)
- {
- int x = OBJ_X(m_obj1_x + sx);
- int y = OBJ_Y(m_obj1_y + sy);
-
- int xx = OBJ_X(m_obj2_x) - x;
- int yy = OBJ_Y(m_obj2_y) - y;
-
- if (xx < 0 || xx >= 32 || yy < 0 || yy >= 32)
- continue;
-
- if (m_obj1->pix16(sy, sx) == 0)
- continue;
-
- if (m_obj2->pix16(yy, xx) != 0)
- {
- m_collh = 0x80;
-
- m_cxh = (x % 128) / 8;
- m_cxh &= 0x0f;
-
- m_cyrh = ((y % 64) / 8) * 2 + (x > 127 ? 1 : 0);
- m_cyrh &= 0x0f;
-
- m_cyqh= y / 64;
- m_cyqh &= 0x0f;
-
- break;
- }
- }
- }
- return 0;
-}
-
-void marinedt_state::machine_start()
-{
- save_item(NAME(m_obj1_a));
- save_item(NAME(m_obj1_x));
- save_item(NAME(m_obj1_y));
- save_item(NAME(m_obj2_a));
- save_item(NAME(m_obj2_x));
- save_item(NAME(m_obj2_y));
- save_item(NAME(m_pd));
- save_item(NAME(m_pf));
- save_item(NAME(m_music));
- save_item(NAME(m_sound));
- save_item(NAME(m_coll));
- save_item(NAME(m_cx));
- save_item(NAME(m_cyr));
- save_item(NAME(m_cyq));
- save_item(NAME(m_collh));
- save_item(NAME(m_cxh));
- save_item(NAME(m_cyrh));
- save_item(NAME(m_cyqh));
-}
-
-void marinedt_state::machine_reset()
-{
- m_obj1_a = 0;
- m_obj1_x = 0;
- m_obj1_y = 0;
- m_obj2_a = 0;
- m_obj2_x = 0;
- m_obj2_y = 0;
- m_pd = 0;
- m_pf = 0;
- m_music = 0;
- m_sound = 0;
- m_coll = 0;
- m_cx = 0;
- m_cyr = 0;
- m_cyq = 0;
- m_collh = 0;
- m_cxh = 0;
- m_cyrh = 0;
- m_cyqh = 0;
-}
static MACHINE_CONFIG_START( marinedt, marinedt_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", Z80,10000000/4)
- MCFG_CPU_PROGRAM_MAP(marinedt_map)
- MCFG_CPU_IO_MAP(marinedt_io_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", marinedt_state, irq0_line_hold)
-
-
- /* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(4*8+32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(marinedt_state, screen_update_marinedt)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", marinedt)
- MCFG_PALETTE_ADD("palette", 64)
- MCFG_PALETTE_INIT_OWNER(marinedt_state, marinedt)
-
- /* sound hardware */
- //discrete sound
MACHINE_CONFIG_END
-
-/***************************************************************************
-
- Game driver(s)
-
-***************************************************************************/
-
ROM_START( marinedt )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "mg01.3d", 0x0000, 0x0800, CRC(ad09f04d) SHA1(932fc973b4a2fbbebd7e6437ed30c8444e3d4afb))
@@ -781,10 +137,10 @@ ROM_START( marinedt )
ROM_LOAD( "mg13.6h", 0x0000, 0x1000, CRC(17817044) SHA1(8c9b96620e3c414952e6d85c6e81b0df85c88e7a) )
ROM_REGION( 0x0080, "proms", 0 )
- ROM_LOAD( "mg14.2a", 0x0000, 0x0020, CRC(f75f4e3a) SHA1(36e665987f475c57435fa8c224a2a3ce0c5e672b) ) //char clr
- ROM_LOAD( "mg15.1a", 0x0020, 0x0020, CRC(cd3ab489) SHA1(a77478fb94d0cf8f4317f89cc9579def7c294b4f) ) //obj clr
- ROM_LOAD( "mg16.4e", 0x0040, 0x0020, CRC(92c868bc) SHA1(483ae6f47845ddacb701528e82bd388d7d66a0fb) ) //?? collisions
- ROM_LOAD( "mg17.bpr", 0x0060, 0x0020, CRC(13261a02) SHA1(050edd18e4f79d19d5206f55f329340432fd4099) ) //?? table of increasing values
+ ROM_LOAD( "mg14.2a", 0x0000, 0x0020, CRC(f75f4e3a) SHA1(36e665987f475c57435fa8c224a2a3ce0c5e672b) )
+ ROM_LOAD( "mg15.1a", 0x0020, 0x0020, CRC(cd3ab489) SHA1(a77478fb94d0cf8f4317f89cc9579def7c294b4f) )
+ ROM_LOAD( "mg16.4e", 0x0040, 0x0020, CRC(92c868bc) SHA1(483ae6f47845ddacb701528e82bd388d7d66a0fb) )
+ ROM_LOAD( "mg17.bpr", 0x0060, 0x0020, CRC(13261a02) SHA1(050edd18e4f79d19d5206f55f329340432fd4099) )
ROM_END
-GAME( 1981, marinedt, 0, marinedt, marinedt, driver_device, 0, ROT270, "Taito", "Marine Date", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1981, marinedt, 0, marinedt, marinedt, driver_device, 0, ROT270, "Taito", "Marine Date", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/marywu.cpp b/src/mame/drivers/marywu.cpp
index ce48608de52..288b244e670 100644
--- a/src/mame/drivers/marywu.cpp
+++ b/src/mame/drivers/marywu.cpp
@@ -1,4 +1,4 @@
-// license:GPL2+
+// license:GPL-2.0+
// copyright-holders:Felipe Sanches
/*************************************************************************
diff --git a/src/mame/drivers/mbdtower.cpp b/src/mame/drivers/mbdtower.cpp
index bd2144742d0..7a1b5ec3dee 100644
--- a/src/mame/drivers/mbdtower.cpp
+++ b/src/mame/drivers/mbdtower.cpp
@@ -5,7 +5,7 @@
** subclass of hh_tms1k_state (includes/hh_tms1k.h, drivers/hh_tms1k.cpp) **
Milton Bradley Dark Tower
- * TMS1400NLL MP7332-N1.U1(Rev. B) or MP7332-N2LL(Rev. C), die labeled MP7332
+ * TMS1400NLL MP7332-N1.U1(Rev. B) or MP7332-N2LL(Rev. C), die label MP7332
(assume same ROM contents between revisions)
* SN75494N MOS-to-LED digit driver
* motorized rotating reel + lightsensor, 1bit-sound
diff --git a/src/mame/drivers/mc1502.cpp b/src/mame/drivers/mc1502.cpp
index ade7c5accfc..9e014ebcf04 100644
--- a/src/mame/drivers/mc1502.cpp
+++ b/src/mame/drivers/mc1502.cpp
@@ -182,7 +182,6 @@ DRIVER_INIT_MEMBER( mc1502_state, mc1502 )
DBG_LOG(0,"init",("driver_init()\n"));
- program.unmap_readwrite(0, 0x7ffff);
program.install_readwrite_bank(0, m_ram->size()-1, "bank10");
membank( "bank10" )->set_base( m_ram->pointer() );
}
@@ -220,16 +219,7 @@ MACHINE_RESET_MEMBER( mc1502_state, mc1502 )
static ADDRESS_MAP_START( mc1502_map, AS_PROGRAM, 8, mc1502_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x97fff) AM_RAM /* 96K on mainboard + 512K on extension card */
- AM_RANGE(0xc0000, 0xfbfff) AM_NOP
- AM_RANGE(0xfc000, 0xfffff) AM_ROM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( pk88_map, AS_PROGRAM, 8, mc1502_state )
- ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x1ffff) AM_RAMBANK("bank10") /* 96K on mainboard */
- AM_RANGE(0xf0000, 0xf7fff) AM_ROM /* BASIC */
- AM_RANGE(0xfc000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(mc1502_io, AS_IO, 8, mc1502_state )
@@ -328,11 +318,6 @@ static MACHINE_CONFIG_START( mc1502, mc1502_state )
MCFG_RAM_EXTRA_OPTIONS("96K")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( pk88, mc1502 )
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(pk88_map)
-MACHINE_CONFIG_END
-
/*
Apparently there was a hardware revision with built-in floppy
@@ -344,42 +329,42 @@ MACHINE_CONFIG_END
QWERTY).
*/
ROM_START( mc1502 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
ROM_DEFAULT_BIOS("v52")
ROM_SYSTEM_BIOS(0, "v50", "v5.0 10/05/89")
- ROMX_LOAD( "monitor_5_0.rom", 0xfc000, 0x4000, CRC(9e97c6a0) SHA1(16a304e8de69ec4d8b92acda6bf28454c361a24f),ROM_BIOS(1))
+ ROMX_LOAD( "monitor_5_0.rom", 0xc000, 0x4000, CRC(9e97c6a0) SHA1(16a304e8de69ec4d8b92acda6bf28454c361a24f),ROM_BIOS(1))
ROM_SYSTEM_BIOS(1, "v52", "v5.2 22/03/91")
- ROMX_LOAD( "monitor_5_2.rom", 0xfc000, 0x4000, CRC(0e65491e) SHA1(8a4d556473b5e0e59b05fab77c79c29f4d562412),ROM_BIOS(2))
+ ROMX_LOAD( "monitor_5_2.rom", 0xc000, 0x4000, CRC(0e65491e) SHA1(8a4d556473b5e0e59b05fab77c79c29f4d562412),ROM_BIOS(2))
ROM_SYSTEM_BIOS(2, "v521", "v5.21 12/10/92")
- ROMX_LOAD( "monitor_5_21.rom", 0xfc000, 0x4000, CRC(28c8f653) SHA1(04b0b09e0b86d9648a83352cc1590eb8963833e0),ROM_BIOS(3))
+ ROMX_LOAD( "monitor_5_21.rom", 0xc000, 0x4000, CRC(28c8f653) SHA1(04b0b09e0b86d9648a83352cc1590eb8963833e0),ROM_BIOS(3))
ROM_SYSTEM_BIOS(3, "v531", "v5.31 12/10/92")
- ROMX_LOAD( "monitor_5_31.rom", 0xfc000, 0x4000, CRC(a48295d5) SHA1(6f38977c22f9cc6c2bc6f6e53edc4048ca6b6721),ROM_BIOS(4))
+ ROMX_LOAD( "monitor_5_31.rom", 0xc000, 0x4000, CRC(a48295d5) SHA1(6f38977c22f9cc6c2bc6f6e53edc4048ca6b6721),ROM_BIOS(4))
ROM_SYSTEM_BIOS(4, "v533", "v5.33 01/08/93")
- ROMX_LOAD( "0_(cbc0).bin", 0xfc000, 0x2000, CRC(9a55bc4f) SHA1(81da44eec2e52cf04b1fc7053502270f51270590),ROM_BIOS(5))
- ROMX_LOAD( "1_(dfe2).bin", 0xfe000, 0x2000, CRC(8dec077a) SHA1(d6f6d7cc2183abc77fbd9cd59132de5766f7c458),ROM_BIOS(5))
+ ROMX_LOAD( "0_(cbc0).bin", 0xc000, 0x2000, CRC(9a55bc4f) SHA1(81da44eec2e52cf04b1fc7053502270f51270590),ROM_BIOS(5))
+ ROMX_LOAD( "1_(dfe2).bin", 0xe000, 0x2000, CRC(8dec077a) SHA1(d6f6d7cc2183abc77fbd9cd59132de5766f7c458),ROM_BIOS(5))
// 5.21 + 3rd party HDC support. fails checksum test so marked BAD_DUMP.
ROM_SYSTEM_BIOS(5, "v521h", "v5.21h 22/09/93")
- ROMX_LOAD( "mshbios0.pgm", 0xfc000, 0x2000, BAD_DUMP CRC(be447261) SHA1(b93c597c17dfa4b678f72c20a3f7119b73e6ba1c),ROM_BIOS(6))
- ROMX_LOAD( "mshbios1.pgm", 0xfe000, 0x2000, BAD_DUMP CRC(89e2eaf2) SHA1(37d6b225b5e35574fdac81219589407d925225be),ROM_BIOS(6))
+ ROMX_LOAD( "mshbios0.pgm", 0xc000, 0x2000, BAD_DUMP CRC(be447261) SHA1(b93c597c17dfa4b678f72c20a3f7119b73e6ba1c),ROM_BIOS(6))
+ ROMX_LOAD( "mshbios1.pgm", 0xe000, 0x2000, BAD_DUMP CRC(89e2eaf2) SHA1(37d6b225b5e35574fdac81219589407d925225be),ROM_BIOS(6))
// 5.3
ROM_SYSTEM_BIOS(6, "v53", "v5.3 10/11/91")
- ROMX_LOAD( "1502~3b0.pgm", 0xfc000, 0x2000, CRC(dc148763) SHA1(7a5e66438007b2de328ac680614f9c4ff60f6a75),ROM_BIOS(7))
- ROMX_LOAD( "1502~3b1.pgm", 0xfe000, 0x2000, CRC(17fc2af2) SHA1(a060d7b7302dfa639025f025106b50412cf26953),ROM_BIOS(7))
+ ROMX_LOAD( "1502~3b0.pgm", 0xc000, 0x2000, CRC(dc148763) SHA1(7a5e66438007b2de328ac680614f9c4ff60f6a75),ROM_BIOS(7))
+ ROMX_LOAD( "1502~3b1.pgm", 0xe000, 0x2000, CRC(17fc2af2) SHA1(a060d7b7302dfa639025f025106b50412cf26953),ROM_BIOS(7))
// 5.1 -- JCUKEN keyboard
ROM_SYSTEM_BIOS(7, "v51", "v5.1 10/12/90")
- ROMX_LOAD( "ms1502b0.pgm", 0xfc000, 0x2000, CRC(92fcc29a) SHA1(930a4cffcd6ec6110dd9a18bd389b78f0ccb110a),ROM_BIOS(8))
- ROMX_LOAD( "ms1502b1.pgm", 0xfe000, 0x2000, CRC(fe355a58) SHA1(b4ef7775045c6f2095e2b487fe19824986a4892c),ROM_BIOS(8))
+ ROMX_LOAD( "ms1502b0.pgm", 0xc000, 0x2000, CRC(92fcc29a) SHA1(930a4cffcd6ec6110dd9a18bd389b78f0ccb110a),ROM_BIOS(8))
+ ROMX_LOAD( "ms1502b1.pgm", 0xe000, 0x2000, CRC(fe355a58) SHA1(b4ef7775045c6f2095e2b487fe19824986a4892c),ROM_BIOS(8))
// 5.31
ROM_SYSTEM_BIOS(8, "v531_92", "v5.31 12/10/92")
- ROMX_LOAD( "ms531b0.pgm", 0xfc000, 0x2000, CRC(d97157d1) SHA1(cb1a1e0e2d9a0fcc78f9b09bfb4814d408ee4fae),ROM_BIOS(9))
- ROMX_LOAD( "ms531b1.pgm", 0xfe000, 0x2000, CRC(b1368e1a) SHA1(286496d25dc0ac2d8fe1802caffc6c37b236d105),ROM_BIOS(9))
+ ROMX_LOAD( "ms531b0.pgm", 0xc000, 0x2000, CRC(d97157d1) SHA1(cb1a1e0e2d9a0fcc78f9b09bfb4814d408ee4fae),ROM_BIOS(9))
+ ROMX_LOAD( "ms531b1.pgm", 0xe000, 0x2000, CRC(b1368e1a) SHA1(286496d25dc0ac2d8fe1802caffc6c37b236d105),ROM_BIOS(9))
// 5.2
ROM_SYSTEM_BIOS(9, "v52_91", "v5.2 10/11/91")
- ROMX_LOAD( "msv5~2b0.pgm", 0xfc000, 0x2000, CRC(f7f370e9) SHA1(e069a35005581a02856853b57dd511ab8e10054b),ROM_BIOS(10))
- ROMX_LOAD( "msv5~2b1.pgm", 0xfe000, 0x2000, CRC(d50e1c43) SHA1(22724dec0052ee9e52f44f5914f2f5f3fae14612),ROM_BIOS(10))
+ ROMX_LOAD( "msv5~2b0.pgm", 0xc000, 0x2000, CRC(f7f370e9) SHA1(e069a35005581a02856853b57dd511ab8e10054b),ROM_BIOS(10))
+ ROMX_LOAD( "msv5~2b1.pgm", 0xe000, 0x2000, CRC(d50e1c43) SHA1(22724dec0052ee9e52f44f5914f2f5f3fae14612),ROM_BIOS(10))
ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00)
ROM_LOAD( "symgen.rom", 0x0000, 0x2000, CRC(b2747a52) SHA1(6766d275467672436e91ac2997ac6b77700eba1e))
@@ -390,14 +375,14 @@ ROM_END
different video subsystem (not emulated).
*/
ROM_START( pk88 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
-
- ROM_LOAD( "b0.064", 0xf0000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9))
- ROM_LOAD( "b1.064", 0xf2000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731))
- ROM_LOAD( "b2.064", 0xf4000, 0x2000, CRC(1ee66152) SHA1(7ed8c4c6c582487e802beabeca5b86702e5083e8))
- ROM_LOAD( "b3.064", 0xf6000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7))
- ROM_LOAD( "pk88-0.064", 0xfc000, 0x2000, CRC(1e4666cf) SHA1(6364c5241f2792909ff318194161eb2c29737546))
- ROM_LOAD( "pk88-1.064", 0xfe000, 0x2000, CRC(6fa7e7ef) SHA1(d68bc273baa46ba733ac6ad4df7569dd70cf60dd))
+ ROM_REGION16_LE(0x10000,"bios", 0)
+
+ ROM_LOAD( "b0.064", 0x0000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9))
+ ROM_LOAD( "b1.064", 0x2000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731))
+ ROM_LOAD( "b2.064", 0x4000, 0x2000, CRC(1ee66152) SHA1(7ed8c4c6c582487e802beabeca5b86702e5083e8))
+ ROM_LOAD( "b3.064", 0x6000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7))
+ ROM_LOAD( "pk88-0.064", 0xc000, 0x2000, CRC(1e4666cf) SHA1(6364c5241f2792909ff318194161eb2c29737546))
+ ROM_LOAD( "pk88-1.064", 0xe000, 0x2000, CRC(6fa7e7ef) SHA1(d68bc273baa46ba733ac6ad4df7569dd70cf60dd))
ROM_END
/***************************************************************************
@@ -408,4 +393,4 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
COMP ( 1989, mc1502, ibm5150, 0, mc1502, mc1502, mc1502_state, mc1502, "NPO Microprocessor", "Elektronika MC-1502", 0)
-COMP ( 1988, pk88, ibm5150, 0, pk88, mc1502, mc1502_state, mc1502, "NPO Microprocessor", "Elektronika PK-88", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
+COMP ( 1988, pk88, ibm5150, 0, mc1502, mc1502, mc1502_state, mc1502, "NPO Microprocessor", "Elektronika PK-88", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
diff --git a/src/mame/drivers/mephisto.cpp b/src/mame/drivers/mephisto.cpp
index 822cbc584a3..987e8442a92 100644
--- a/src/mame/drivers/mephisto.cpp
+++ b/src/mame/drivers/mephisto.cpp
@@ -67,14 +67,11 @@ Mephisto 4 Turbo Kit 18mhz - (mm4tk)
#include "sound/beep.h"
//#include "mephisto.lh"
-#include "includes/mboard.h"
-
-
-class mephisto_state : public mboard_state
+class mephisto_state : public driver_device
{
public:
mephisto_state(const machine_config &mconfig, device_type type, const char *tag)
- : mboard_state(mconfig, type, tag)
+ : driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_beep(*this, "beeper")
, m_key1_0(*this, "KEY1_0")
@@ -218,10 +215,10 @@ static ADDRESS_MAP_START( rebel5_mem, AS_PROGRAM, 8, mephisto_state )
AM_RANGE( 0x0000, 0x1fff) AM_RAM // AM_BASE(m_p_ram)
AM_RANGE( 0x2000, 0x2007) AM_WRITE(write_led) // Status LEDs+ buzzer
AM_RANGE( 0x3000, 0x3007) AM_READ(read_keys) // Rebel 5.0
- AM_RANGE( 0x3000, 0x4000) AM_READ(mboard_read_board_8) // Chessboard
+ //AM_RANGE( 0x3000, 0x4000) AM_READ(mboard_read_board_8) // Chessboard
AM_RANGE( 0x5000, 0x5000) AM_WRITE(write_lcd)
- AM_RANGE( 0x6000, 0x6000) AM_WRITE(mboard_write_LED_8) // Chessboard
- AM_RANGE( 0x7000, 0x7000) AM_WRITE(mboard_write_board_8) // Chessboard
+ //AM_RANGE( 0x6000, 0x6000) AM_WRITE(mboard_write_LED_8) // Chessboard
+ //AM_RANGE( 0x7000, 0x7000) AM_WRITE(mboard_write_board_8) // Chessboard
AM_RANGE( 0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -229,10 +226,10 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( mephisto_mem, AS_PROGRAM, 8, mephisto_state )
AM_RANGE( 0x0000, 0x1fff) AM_RAM //AM_BASE(m_p_ram)
AM_RANGE( 0x2000, 0x2000) AM_WRITE(write_lcd)
- AM_RANGE( 0x2400, 0x2407) AM_WRITE(mboard_write_LED_8) // Chessboard
- AM_RANGE( 0x2800, 0x2800) AM_WRITE(mboard_write_board_8) // Chessboard
+ //AM_RANGE( 0x2400, 0x2407) AM_WRITE(mboard_write_LED_8) // Chessboard
+ //AM_RANGE( 0x2800, 0x2800) AM_WRITE(mboard_write_board_8) // Chessboard
AM_RANGE( 0x2c00, 0x2c07) AM_READ(read_keys)
- AM_RANGE( 0x3000, 0x3000) AM_READ(mboard_read_board_8) // Chessboard
+ //AM_RANGE( 0x3000, 0x3000) AM_READ(mboard_read_board_8) // Chessboard
AM_RANGE( 0x3400, 0x3407) AM_WRITE(write_led) // Status LEDs+ buzzer
AM_RANGE( 0x3800, 0x3800) AM_WRITE(mephisto_NMI) // NMI enable
AM_RANGE( 0x4000, 0x7fff) AM_ROM // Opening Library
@@ -243,10 +240,10 @@ static ADDRESS_MAP_START( mm2_mem, AS_PROGRAM, 8, mephisto_state )
AM_RANGE( 0x0000, 0x0fff) AM_RAM //AM_BASE(m_p_ram)
AM_RANGE( 0x1000, 0x1007) AM_WRITE(write_led_mm2) //Status LEDs
AM_RANGE( 0x1800, 0x1807) AM_READ(read_keys)
- AM_RANGE( 0x2000, 0x2000) AM_READ(mboard_read_board_8) //Chessboard
+ //AM_RANGE( 0x2000, 0x2000) AM_READ(mboard_read_board_8) //Chessboard
AM_RANGE( 0x2800, 0x2800) AM_WRITE(write_lcd)
- AM_RANGE( 0x3000, 0x3000) AM_WRITE(mboard_write_LED_8) //Chessboard
- AM_RANGE( 0x3800, 0x3800) AM_WRITE(mboard_write_board_8) //Chessboard
+ //AM_RANGE( 0x3000, 0x3000) AM_WRITE(mboard_write_LED_8) //Chessboard
+ //AM_RANGE( 0x3800, 0x3800) AM_WRITE(mboard_write_board_8) //Chessboard
AM_RANGE( 0x4000, 0x7fff) AM_ROM // Opening Library ?
AM_RANGE( 0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -288,7 +285,6 @@ static INPUT_PORTS_START( mephisto )
PORT_START("KEY2_7") //Port $2c0f
PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D 4") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4)
- PORT_INCLUDE( chessboard )
INPUT_PORTS_END
@@ -319,7 +315,7 @@ void mephisto_state::machine_start()
{
m_lcd_shift_counter = 3;
m_allowNMI = 1;
- mboard_savestate_register();
+ //mboard_savestate_register();
}
MACHINE_START_MEMBER(mephisto_state,mm2)
@@ -327,7 +323,7 @@ MACHINE_START_MEMBER(mephisto_state,mm2)
m_lcd_shift_counter = 3;
m_led7=0xff;
- mboard_savestate_register();
+ //mboard_savestate_register();
}
@@ -335,8 +331,8 @@ void mephisto_state::machine_reset()
{
m_lcd_shift_counter = 3;
m_allowNMI = 1;
- mboard_set_border_pieces();
- mboard_set_board();
+ //mboard_set_border_pieces();
+ //mboard_set_board();
/* adjust artwork depending on current emulation*/
@@ -369,7 +365,7 @@ static MACHINE_CONFIG_START( mephisto, mephisto_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", mephisto_state, update_nmi, attotime::from_hz(600))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", mephisto_state, mboard_update_artwork, attotime::from_hz(100))
+ //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", mephisto_state, mboard_update_artwork, attotime::from_hz(100))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( rebel5, mephisto )
@@ -461,10 +457,10 @@ DRIVER_INIT_MEMBER(mephisto_state,mephisto)
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
-CONS( 1984, mm2, mm4, 0, mm2, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto MM2 Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1986, rebel5, mm4, 0, rebel5, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto Rebell 5,0 Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1987, mm4, 0, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer Turbo Kit + HG440", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1990, mm5, mm4, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1990, mm50, mm4, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.0 Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1990, mm5tk, mm4, 0, mm4tk, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer Turbo Kit + HG550", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1984, mm2, mm4, 0, mm2, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto MM2 Schachcomputer", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1986, rebel5, mm4, 0, rebel5, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto Rebell 5,0 Schachcomputer", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1987, mm4, 0, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer Turbo Kit + HG440", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1990, mm5, mm4, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1990, mm50, mm4, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.0 Schachcomputer", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1990, mm5tk, mm4, 0, mm4tk, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer Turbo Kit + HG550", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp
index c00f2dd51ee..ef372c617ee 100644
--- a/src/mame/drivers/metro.cpp
+++ b/src/mame/drivers/metro.cpp
@@ -96,7 +96,7 @@ Notes:
- vmetal: has Sega and Taito logos in the roms ?!
-driver modified by Eisuke Watanabe
+driver modified by Hau
***************************************************************************/
#include "emu.h"
diff --git a/src/mame/drivers/mmodular.cpp b/src/mame/drivers/mmodular.cpp
index 09e83e6dcf6..16d469baa25 100644
--- a/src/mame/drivers/mmodular.cpp
+++ b/src/mame/drivers/mmodular.cpp
@@ -3,8 +3,6 @@
/******************************************************************************
Mephisto Chess Computers using plugin modules
- Vancouver Chess Computer 68000 (driver recalled) by R. Schaefer (2010)
-
(most of the magnetic sensor versions with 680x0 family modules)
Almeria 68000 12Mhz
@@ -57,12 +55,6 @@
holding CLEAR clears Battery Backed RAM on the Berlin (Pro) 68020
******************************************************************************/
-/******************************************************************************
- Mephisto Polgar & Milano
- 2010 Dirk V., Ralf Schafer, Cowering
-
-******************************************************************************/
-
/*
CPU 65C02 P4 4.9152 MHz
@@ -96,7 +88,6 @@ Bit 5+6 LED 1-8 enable
#include "rendlay.h"
-#include "includes/mboard.h"
#include "machine/nvram.h"
//static UINT16 unknown2_data = 0;
@@ -125,15 +116,17 @@ INPUT_PORTS_EXTERN( chessboard );
UINT8 lcd32_char;
-class polgar_state : public mboard_state
+class polgar_state : public driver_device
{
public:
polgar_state(const machine_config &mconfig, device_type type, const char *tag)
- : mboard_state(mconfig, type, tag),
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
m_lcdc(*this, "hd44780"),
m_beeper(*this, "beeper")
{ }
+ required_device<cpu_device> m_maincpu;
optional_device<hd44780_device> m_lcdc;
optional_device<beep_device> m_beeper;
@@ -637,9 +630,9 @@ WRITE8_MEMBER(polgar_state::monteciv_3006)
WRITE8_MEMBER(polgar_state::academy_write_board)
{
- latch_data = data;
+ //latch_data = data;
// logerror("acad_write_latch %02x\n",data);
- if (data != 0xff) mboard_write_board_8(space,0, data);
+ //if (data != 0xff) mboard_write_board_8(space,0, data);
}
WRITE8_MEMBER(polgar_state::milano_write_board)
@@ -658,7 +651,7 @@ READ8_MEMBER(polgar_state::milano_read_board)
if (latch_data)
{
- line = get_first_cleared_bit(latch_data);
+ line = 0;//get_first_cleared_bit(latch_data);
tmp = ioport(board_lines[line])->read();
if (tmp != 0xff)
@@ -712,7 +705,7 @@ READ32_MEMBER(polgar_state::read_keys_BPL32)
} else {
if (BPL32latch_data & 0x7f) {
logerror("ReadingBoard %02x\n",BPL32latch_data);
- line = get_first_cleared_bit(BPL32latch_data);
+ line = 0;//get_first_cleared_bit(BPL32latch_data);
tmp = ioport(board_lines[line])->read();
if (tmp != 0xff)
@@ -751,7 +744,7 @@ READ8_MEMBER(polgar_state::read_keys_board_monteciv)
UINT8 data = 0;
if (monteciv_select[0] == 0xff && monteciv_select[1] == 0xff) {
- data = mboard_read_board_8(space,0);
+ //data = mboard_read_board_8(space,0);
} else {
if (monteciv_select[0] == 0x0) {
data = ioport("BUTTONS_MONTE2")->read();
@@ -789,7 +782,7 @@ READ8_MEMBER(polgar_state::read_keys_board_academy)
data = ioport("BUTTONS_ACAD")->read();
} else {
// if (latch_data & 0x7f) {
- data = mboard_read_board_8(space,0);
+ //data = mboard_read_board_8(space,0);
// data = milano_read_board(space,0);
// logerror("ReadingBoard %02x\n",latch_data);
@@ -1014,20 +1007,16 @@ MACHINE_START_MEMBER(polgar_state,risc)
void polgar_state::common_chess_start()
{
- mboard_set_border_pieces();
- mboard_set_board();
}
MACHINE_START_MEMBER(polgar_state,polgar)
{
common_chess_start();
- mboard_savestate_register();
}
MACHINE_START_MEMBER(polgar_state,sfortea)
{
common_chess_start();
- mboard_savestate_register();
}
MACHINE_START_MEMBER(polgar_state,diablo68)
@@ -1037,7 +1026,6 @@ MACHINE_START_MEMBER(polgar_state,diablo68)
MACHINE_START_MEMBER(polgar_state,van16)
{
- mboard_savestate_register();
}
MACHINE_RESET_MEMBER(polgar_state,van16)
@@ -1096,9 +1084,9 @@ GFXDECODE_END
static ADDRESS_MAP_START(polgar_mem , AS_PROGRAM, 8, polgar_state )
AM_RANGE( 0x0000, 0x1fff ) AM_RAM
- AM_RANGE( 0x2400, 0x2400 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard
- AM_RANGE( 0x2800, 0x2800 ) AM_WRITE(mboard_write_board_8) // Chessboard
- AM_RANGE( 0x3000, 0x3000 ) AM_READ(mboard_read_board_8 ) // Chessboard
+ //AM_RANGE( 0x2400, 0x2400 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard
+// AM_RANGE( 0x2800, 0x2800 ) AM_WRITE(mboard_write_board_8) // Chessboard
+// AM_RANGE( 0x3000, 0x3000 ) AM_READ(mboard_read_board_8 ) // Chessboard
AM_RANGE( 0x3400, 0x3405 ) AM_WRITE(polgar_write_LED) // Function LEDs
AM_RANGE( 0x2c00, 0x2c07 ) AM_READ(read_keys)
AM_RANGE( 0x2004, 0x2004 ) AM_WRITE(write_polgar_IO ) // LCD Instr. Reg + Beeper
@@ -1121,11 +1109,11 @@ static ADDRESS_MAP_START(gen32_mem, AS_PROGRAM, 32, polgar_state )
AM_RANGE( 0x00000000, 0x0003ffff ) AM_ROM
- AM_RANGE( 0xc0000000 , 0xc0000003 ) AM_READ(mboard_read_board_32 )
- AM_RANGE( 0xc8000000 , 0xc8000003 ) AM_WRITE(mboard_write_board_32 )
- AM_RANGE( 0xc8000004 , 0xc8000007 ) AM_WRITE(mboard_write_board_32 )
- AM_RANGE( 0xd0000000 , 0xd0000003 ) AM_WRITE(mboard_write_LED_32 )
- AM_RANGE( 0xd0000004 , 0xd0000007 ) AM_WRITE(mboard_write_LED_32 )
+ //AM_RANGE( 0xc0000000 , 0xc0000003 ) AM_READ(mboard_read_board_32 )
+ //AM_RANGE( 0xc8000000 , 0xc8000003 ) AM_WRITE(mboard_write_board_32 )
+ //AM_RANGE( 0xc8000004 , 0xc8000007 ) AM_WRITE(mboard_write_board_32 )
+ //AM_RANGE( 0xd0000000 , 0xd0000003 ) AM_WRITE(mboard_write_LED_32 )
+ //AM_RANGE( 0xd0000004 , 0xd0000007 ) AM_WRITE(mboard_write_LED_32 )
AM_RANGE( 0xf0000004 , 0xf0000013 ) AM_READ(read_buttons_gen32 )
AM_RANGE( 0xe0000000 , 0xe0000003 ) AM_WRITE(write_LCD_data_32 )
AM_RANGE( 0xe0000010 , 0xe0000013 ) AM_WRITE(write_IOenables_32 )
@@ -1156,9 +1144,9 @@ static ADDRESS_MAP_START(van32_mem, AS_PROGRAM, 32, polgar_state )
AM_RANGE( 0x00000000, 0x0003ffff ) AM_ROM
- AM_RANGE( 0x800000fc , 0x800000ff ) AM_READ(mboard_read_board_32 )
- AM_RANGE( 0x88000000 , 0x88000007 ) AM_WRITE(mboard_write_board_32 )
- AM_RANGE( 0x90000000 , 0x90000007 ) AM_WRITE(mboard_write_LED_32 )
+ //AM_RANGE( 0x800000fc , 0x800000ff ) AM_READ(mboard_read_board_32 )
+// AM_RANGE( 0x88000000 , 0x88000007 ) AM_WRITE(mboard_write_board_32 )
+// AM_RANGE( 0x90000000 , 0x90000007 ) AM_WRITE(mboard_write_LED_32 )
AM_RANGE( 0x800000ec , 0x800000ff ) AM_READ(read_buttons_van32 )
AM_RANGE( 0xa0000000 , 0xa0000003 ) AM_WRITE(write_LCD_data_32 )
AM_RANGE( 0xa0000010 , 0xa0000013 ) AM_WRITE(write_IOenables_32 )
@@ -1176,9 +1164,9 @@ static ADDRESS_MAP_START(alm32_mem, AS_PROGRAM, 32, polgar_state )
AM_RANGE( 0x00000000, 0x0001ffff ) AM_ROM
- AM_RANGE( 0x800000fc , 0x800000ff ) AM_READ(mboard_read_board_32 )
- AM_RANGE( 0x88000000 , 0x88000007 ) AM_WRITE(mboard_write_board_32 )
- AM_RANGE( 0x90000000 , 0x90000007 ) AM_WRITE(mboard_write_LED_32 )
+ //AM_RANGE( 0x800000fc , 0x800000ff ) AM_READ(mboard_read_board_32 )
+ //AM_RANGE( 0x88000000 , 0x88000007 ) AM_WRITE(mboard_write_board_32 )
+ //AM_RANGE( 0x90000000 , 0x90000007 ) AM_WRITE(mboard_write_LED_32 )
AM_RANGE( 0x800000ec , 0x800000ff ) AM_READ(read_buttons_van32 )
AM_RANGE( 0xa0000000 , 0xa0000003 ) AM_WRITE(write_LCD_data_32 )
AM_RANGE( 0xa0000010 , 0xa0000013 ) AM_WRITE(write_IOenables_32 )
@@ -1204,9 +1192,9 @@ static ADDRESS_MAP_START(van16_mem, AS_PROGRAM, 16, polgar_state )
AM_RANGE( 0x000000, 0x03ffff ) AM_ROM
- AM_RANGE( 0xc00000 , 0xc00001 ) AM_READ(mboard_read_board_16 )
- AM_RANGE( 0xc80000 , 0xc80001 ) AM_WRITE(mboard_write_board_16 )
- AM_RANGE( 0xd00000 , 0xd00001 ) AM_WRITE(mboard_write_LED_16 )
+ //AM_RANGE( 0xc00000 , 0xc00001 ) AM_READ(mboard_read_board_16 )
+ //AM_RANGE( 0xc80000 , 0xc80001 ) AM_WRITE(mboard_write_board_16 )
+ //AM_RANGE( 0xd00000 , 0xd00001 ) AM_WRITE(mboard_write_LED_16 )
AM_RANGE( 0xf00000 , 0xf00009 ) AM_READ(read_buttons_van16 )
AM_RANGE( 0xd80000 , 0xd80001 ) AM_WRITE(write_LCD_data )
AM_RANGE( 0xd80008 , 0xd80009 ) AM_WRITE(write_IOenables )
@@ -1223,9 +1211,9 @@ static ADDRESS_MAP_START(alm16_mem, AS_PROGRAM, 16, polgar_state )
AM_RANGE( 0x000000, 0x01ffff ) AM_ROM
- AM_RANGE( 0xc00000 , 0xc00001 ) AM_READ(mboard_read_board_16 )
- AM_RANGE( 0xc80000 , 0xc80001 ) AM_WRITE(mboard_write_board_16 )
- AM_RANGE( 0xd00000 , 0xd00001 ) AM_WRITE(mboard_write_LED_16 )
+ //AM_RANGE( 0xc00000 , 0xc00001 ) AM_READ(mboard_read_board_16 )
+ //AM_RANGE( 0xc80000 , 0xc80001 ) AM_WRITE(mboard_write_board_16 )
+ //AM_RANGE( 0xd00000 , 0xd00001 ) AM_WRITE(mboard_write_LED_16 )
AM_RANGE( 0xf00000 , 0xf00009 ) AM_READ(read_buttons_van16 )
AM_RANGE( 0xd80000 , 0xd80001 ) AM_WRITE(write_LCD_data )
AM_RANGE( 0xd80008 , 0xd80009 ) AM_WRITE(write_IOenables )
@@ -1255,7 +1243,7 @@ static ADDRESS_MAP_START(academy_mem , AS_PROGRAM, 8, polgar_state )
AM_RANGE( 0x0000, 0x1fff ) AM_RAM
AM_RANGE( 0x2400, 0x2400 ) AM_READ(read_keys_board_academy )
AM_RANGE( 0x2800, 0x2800 ) AM_WRITE(academy_write_board ) // Chessboard
- AM_RANGE( 0x2c00, 0x2c00 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard
+ //AM_RANGE( 0x2c00, 0x2c00 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard
AM_RANGE( 0x3002, 0x3002 ) AM_WRITE(beep_academy )
AM_RANGE( 0x3001, 0x3001 ) AM_WRITE(academy_inhibitNMI )
AM_RANGE( 0x3400, 0x3400 ) AM_WRITE(academy_write_LED )
@@ -1267,7 +1255,7 @@ static ADDRESS_MAP_START(monteciv_mem , AS_PROGRAM, 8, polgar_state )
AM_RANGE( 0x0000, 0x1fff ) AM_RAM
AM_RANGE( 0x2400, 0x2400 ) AM_READ(read_keys_board_monteciv )
AM_RANGE( 0x2800, 0x2800 ) AM_WRITE(academy_write_board ) // Chessboard
- AM_RANGE( 0x2c00, 0x2c00 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard
+ //AM_RANGE( 0x2c00, 0x2c00 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard
AM_RANGE( 0x3400, 0x3400 ) AM_WRITE(academy_write_LED ) // Status LEDs
AM_RANGE( 0x3000, 0x3001 ) AM_WRITE(monteciv_select_line ) // Select Keyline
AM_RANGE( 0x3002, 0x3002 ) AM_WRITE(beep_academy )
@@ -1334,8 +1322,6 @@ static INPUT_PORTS_START( polgar )
// PORT_START("KEY1_8")
// PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(" A") PORT_CODE(KEYCODE_1)
- PORT_INCLUDE( chessboard )
-
INPUT_PORTS_END
static INPUT_PORTS_START( sfortea )
@@ -1369,8 +1355,6 @@ static INPUT_PORTS_START( sfortea )
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RST1") PORT_CODE(KEYCODE_7)
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RST2") PORT_CODE(KEYCODE_8)
*/
-
- PORT_INCLUDE( chessboard )
INPUT_PORTS_END
static INPUT_PORTS_START( academy )
@@ -1384,7 +1368,6 @@ static INPUT_PORTS_START( academy )
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(" ENT") PORT_CODE(KEYCODE_F7)
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(" CL") PORT_CODE(KEYCODE_F8)
- PORT_INCLUDE( chessboard )
INPUT_PORTS_END
static INPUT_PORTS_START( megaiv )
@@ -1408,7 +1391,6 @@ static INPUT_PORTS_START( megaiv )
// PORT_START("KEY1_8")
// PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(" A") PORT_CODE(KEYCODE_1)
- PORT_INCLUDE( chessboard )
INPUT_PORTS_END
@@ -1435,7 +1417,6 @@ static INPUT_PORTS_START( monteciv )
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_8)
- PORT_INCLUDE( chessboard )
INPUT_PORTS_END
@@ -1453,7 +1434,6 @@ static INPUT_PORTS_START( gen32 )
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT)
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSLASH)
- PORT_INCLUDE( chessboard )
INPUT_PORTS_END
@@ -1468,7 +1448,6 @@ static INPUT_PORTS_START( bpl32 )
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSLASH)
- PORT_INCLUDE( chessboard )
INPUT_PORTS_END
@@ -1487,9 +1466,8 @@ static INPUT_PORTS_START( van32 )
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSLASH)
- PORT_INCLUDE( chessboard )
- INPUT_PORTS_END
+INPUT_PORTS_END
static INPUT_PORTS_START( van16 )
@@ -1505,7 +1483,6 @@ static INPUT_PORTS_START( van16 )
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSLASH)
- PORT_INCLUDE( chessboard )
INPUT_PORTS_END
@@ -1546,7 +1523,7 @@ static MACHINE_CONFIG_START( polgar, polgar_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", polgar_state, cause_nmi, attotime::from_hz(600))
MCFG_TIMER_START_DELAY(attotime::from_hz(60))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100))
+ //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100))
MACHINE_CONFIG_END
@@ -1563,7 +1540,7 @@ static MACHINE_CONFIG_START( sfortea, polgar_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", polgar_state, cause_M6502_irq, attotime::from_hz(600))
MCFG_TIMER_START_DELAY(attotime::from_hz(60))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100))
+ //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100))
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( alm32, polgar_state )
@@ -1572,7 +1549,7 @@ static MACHINE_CONFIG_START( alm32, polgar_state )
MCFG_MACHINE_START_OVERRIDE(polgar_state,van32)
MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16)
MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(750))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
+ //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
MCFG_FRAGMENT_ADD( chess_common )
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -1605,7 +1582,7 @@ static MACHINE_CONFIG_START( monteciv, polgar_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", polgar_state, cause_nmi, attotime::from_hz(600))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100))
+ //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100))
MACHINE_CONFIG_END
@@ -1626,7 +1603,7 @@ static MACHINE_CONFIG_START( diablo68, polgar_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq2, attotime::from_hz(60))
MCFG_TIMER_START_DELAY(attotime::from_hz(30))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
+ //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
MACHINE_CONFIG_END
@@ -1638,7 +1615,7 @@ static MACHINE_CONFIG_START( van16, polgar_state )
MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16)
MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(600))
//MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(587))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
+ //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
MCFG_FRAGMENT_ADD( chess_common )
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -1655,7 +1632,7 @@ static MACHINE_CONFIG_START( van32, polgar_state )
MCFG_MACHINE_START_OVERRIDE(polgar_state,van32)
MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16)
MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(750))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
+ //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
MCFG_FRAGMENT_ADD( chess_common )
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -1667,7 +1644,7 @@ static MACHINE_CONFIG_START( risc, polgar_state )
MCFG_CPU_PROGRAM_MAP(risc_mem)
MCFG_MACHINE_START_OVERRIDE(polgar_state,risc)
MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
+ //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
MCFG_FRAGMENT_ADD( chess_common )
// MCFG_NVRAM_ADD_0FILL("nvram")
@@ -1681,7 +1658,7 @@ static MACHINE_CONFIG_START( gen32, polgar_state )
MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16)
MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(375))
//MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(368.64))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
+ //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120))
MCFG_FRAGMENT_ADD( chess_common )
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -1695,7 +1672,7 @@ static MACHINE_CONFIG_START( bpl32, polgar_state )
MCFG_MACHINE_START_OVERRIDE(polgar_state,van32)
MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16)
MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(750))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100))
+ //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100))
MCFG_FRAGMENT_ADD( chess_common )
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -1863,29 +1840,29 @@ DRIVER_INIT_MEMBER(polgar_state,polgar)
}
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
- CONS( 1986, polgar, 0, 0, polgar, polgar, polgar_state, polgar, "Hegener & Glaser", "Mephisto Polgar Schachcomputer", MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK)
- CONS( 1987, sfortea, 0, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version A)", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1988, alm16, van16, 0, alm16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Almeria 68000", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1988, alm32, van16, 0, alm32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Alimera 68020", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1988, sforteb, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version B)", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1988, sforteba, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version B, alt)", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1988, sexpertb, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Expert B Chess Computer", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1986, polgar, 0, 0, polgar, polgar, polgar_state, polgar, "Hegener & Glaser", "Mephisto Polgar Schachcomputer", MACHINE_NOT_WORKING | MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK)
+ CONS( 1987, sfortea, 0, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1988, alm16, van16, 0, alm16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Almeria 68000", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1988, alm32, van16, 0, alm32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Alimera 68020", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1988, sforteb, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version B)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1988, sforteba, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version B, alt)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1988, sexpertb, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Expert B Chess Computer", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
CONS( 1989, academy, 0, 0, academy, academy, driver_device, 0, "Hegener & Glaser", "Mephisto Academy Schachcomputer", MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1989, megaiv, 0, 0, megaiv, megaiv, driver_device, 0, "Hegener & Glaser", "Mephisto Mega IV Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1989, megaiv, 0, 0, megaiv, megaiv, driver_device, 0, "Hegener & Glaser", "Mephisto Mega IV Schachcomputer", MACHINE_NOT_WORKING|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
CONS( 1989, milano, polgar, 0, milano, polgar, polgar_state, polgar, "Hegener & Glaser", "Mephisto Milano Schachcomputer", MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
-//CONS( 1989, montec4, 0, 0, monteciv, monteciv, driver_device, 0, "Hegener & Glaser", "Mephisto Monte Carlo IV", MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1989, sfortec, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version C)", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1989, sexpertc, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Expert C Chess Computer", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1990, lyon16, van16, 0, alm16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Lyon 68000", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1990, lyon32, van16, 0, alm32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Lyon 68020", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1990, monteciv, 0, 0, monteciv, monteciv, driver_device, 0, "Hegener & Glaser", "Mephisto Monte Carlo IV LE Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1991, diablo68, 0, 0, diablo68, sfortea, driver_device, 0, "Novag", "Novag Diablo 68000 Chess Computer", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1991, van16, 0, 0, van16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Vancouver 68000", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1991, van32, van16, 0, van32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Vancouver 68020", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1992, risc, 0, 0, risc, van16, driver_device, 0, "Saitek", "RISC2500", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1993, gen32, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.00", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1993, gen32_41, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.01", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1994, berlinp, van16, 0, bpl32, bpl32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Berlin Pro 68020", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1996, bpl32, van16, 0, bpl32, bpl32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Berlin Pro London Upgrade V5.00", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1996, lond020, van16, 0, van32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto London 68020 32 Bit", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
- CONS( 1996, lond030, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 London Upgrade V5.00", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+//CONS( 1989, montec4, 0, 0, monteciv, monteciv, driver_device, 0, "Hegener & Glaser", "Mephisto Monte Carlo IV", MACHINE_NOT_WORKING|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1989, sfortec, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version C)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1989, sexpertc, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Expert C Chess Computer", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1990, lyon16, van16, 0, alm16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Lyon 68000", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1990, lyon32, van16, 0, alm32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Lyon 68020", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1990, monteciv, 0, 0, monteciv, monteciv, driver_device, 0, "Hegener & Glaser", "Mephisto Monte Carlo IV LE Schachcomputer", MACHINE_NOT_WORKING|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1991, diablo68, 0, 0, diablo68, sfortea, driver_device, 0, "Novag", "Novag Diablo 68000 Chess Computer", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1991, van16, 0, 0, van16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Vancouver 68000", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1991, van32, van16, 0, van32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Vancouver 68020", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1992, risc, 0, 0, risc, van16, driver_device, 0, "Saitek", "RISC2500", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1993, gen32, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.00", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1993, gen32_41, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.01", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1994, berlinp, van16, 0, bpl32, bpl32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Berlin Pro 68020", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1996, bpl32, van16, 0, bpl32, bpl32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Berlin Pro London Upgrade V5.00", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1996, lond020, van16, 0, van32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto London 68020 32 Bit", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
+ CONS( 1996, lond030, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 London Upgrade V5.00", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/mt735.cpp b/src/mame/drivers/mt735.cpp
index 4e642a4fa31..b6bbfffa5e6 100644
--- a/src/mame/drivers/mt735.cpp
+++ b/src/mame/drivers/mt735.cpp
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Cowering, Olivier Galibert
/*
Brother MT735 thermal printer
*/
diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp
index 7fd3f9128bd..ff8ce2072e8 100644
--- a/src/mame/drivers/notetaker.cpp
+++ b/src/mame/drivers/notetaker.cpp
@@ -136,7 +136,7 @@ WRITE16_MEMBER(notetaker_state::IPConReg_w)
//m_ProcLock = (data&0x40)?1:0; // bus lock for this processor (hold other processor in wait state)
//m_CharCtr = (data&0x20)?1:0; // battery charge control
m_DisableROM = (data&0x10)?1:0; // disable rom at 0000-0fff
- //m_CorrOn = (data&0x08)?1:0; // corron (?) also LedInd5
+ //m_CorrOn = (data&0x08)?1:0; // CorrectionOn (ECC correction enabled); also LedInd5
//m_LedInd6 = (data&0x04)?1:0;
//m_LedInd7 = (data&0x02)?1:0;
//m_LedInd8 = (data&0x01)?1:0;
@@ -250,7 +250,9 @@ READ16_MEMBER(notetaker_state::iocpu_r)
}
else
{
- ram += (offset);
+ // are we in the FFFE8-FFFEF area where the parity/int/reset/etc stuff lives?
+ if (offset >= 0x7fff4) { logerror("attempt to read processor control regs at %d\n", offset<<1); return 0xFFFF; }
+ ram += offset;
return *ram;
}
}
@@ -260,9 +262,11 @@ WRITE16_MEMBER(notetaker_state::iocpu_w)
UINT16 *ram = (UINT16 *)(memregion("mainram")->base());
if ( (m_BootSeqDone == 0) || ((m_DisableROM == 0) && ((offset&0x7F800) == 0)) )
{
- logerror("attempt to write %04X to ROM-mapped area at %06X ignored\n", data, offset);
+ logerror("attempt to write %04X to ROM-mapped area at %06X ignored\n", data, offset<<1);
return;
}
+ // are we in the FFFE8-FFFEF area where the parity/int/reset/etc stuff lives?
+ if (offset >= 0x7fff4) { logerror("attempt to write processor control regs at %d with %02X ignored\n", offset<<1, data); }
ram += offset;
*ram = data;
}
@@ -277,21 +281,40 @@ mode 1: (during most of boot)
0 0 0 0 0 0 1 * * * * * * * * * * * * * 1 0 RW RAM
<anything not all zeroes>x x x x x x x x x x x x x x 1 0 . Open Bus
mode 2: (during load of the emulatorcpu's firmware to the first 4k of shared ram which is on the emulatorcpu board)
-0 0 0 0 0 0 * * * * * * * * * * * * * * 1 1 RW RAM
+0 0 * * * * * * * * * * * * * * * * * * 1 1 RW RAM
<anything not all zeroes>x x x x x x x x x x x x x x 1 1 . Open Bus
+ EXCEPT for the following, decoded by the memory address logic board:
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 x 1 x . Open Bus
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 x 1 x W FFFEA (Multiprocessor Control (reset/int/boot for each proc; data bits 3,2,1,0 = 0010 means IP, bits 3210 = 0111 means EP; all others ignored.))
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 x 1 x R FFFEC (Syndrome bits (gnd bit 15, parity bit 14, exp (ECC) bits 13-8, bits 7-0 are 'other' (?maybe highest address bits?)
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 x 1 x R FFFEE (Parity Error Address: row bits 15-8, column bits 7-0; reading this acknowledges a parity interrupt)
More or less:
BootSeqDone is 0, DisableROM is ignored, mem map is 0x00000-0xfffff reading is the 0x1000-long ROM, repeated every 0x1000 bytes. writing goes nowhere.
BootSeqDone is 1, DisableROM is 0, mem map is 0x00000-0x00fff reading is the 0x1000-long ROM, remainder of memory map goes to RAM or open bus. writing the ROM area goes nowhere, writing RAM goes to RAM.
BootSeqDone is 1, DisableROM is 1, mem map is entirely RAM or open bus for both reading and writing.
+
+
+Emulator cpu mem map:
+a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0 4KPage0'
+x x 0 0 0 0 0 0 * * * * * * * * * * * * 0 RW Local (fast) RAM
+x x 0 0 0 0 0 0 * * * * * * * * * * * * 1 RW System/Shared RAM
+x x * * * * * * * * * * * * * * * * * * x RW System/Shared RAM
+ EXCEPT for the following, decoded by the EP board and superseding above:
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 x x x x x x RW FFFC0-FFFDF (trigger ILLINST interrupt on EP, data ignored?)
+ And the following, decoded by the memory address logic board:
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 x x . Open Bus
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 x x W FFFEA (Multiprocessor Control (reset/int/boot for each proc; data bits 3,2,1,0 = 0010 means IP, bits 3210 = 0111 means EP; all others ignored.))
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 x x R FFFEC (Syndrome bits (gnd bit 15, parity bit 14, exp bits 13-8, bits 7-0 are 'other', maybe highest address bits)
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 x x R FFFEE (Parity Error Address: row bits 15-8, column bits 7-0; reading this acknowledges a parity interrupt)
*/
+
static ADDRESS_MAP_START(notetaker_iocpu_mem, AS_PROGRAM, 16, notetaker_state)
/*
- AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("iocpu", 0xFF000) // rom is here if either BootSeqDone OR DisableROM are zero. the 1.5 source code implies writes here are ignored
- AM_RANGE(0x01000, 0x01fff) AM_RAM // 4k of ram, local to the io processor
- AM_RANGE(0x02000, 0x3ffff) AM_RAM AM_BASE("mainram") // 256k of ram (less 8k), shared between both processors
+ AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("iocpu", 0xFF000) // rom is here if either BootSeqDone OR DisableROM are zero. the 1.5 source code and the schematics implies writes here are ignored while rom is enabled; if disablerom is 1 this goes to mainram
+ AM_RANGE(0x01000, 0x3ffff) AM_RAM AM_BASE("mainram") // 256k of ram (less 4k), shared between both processors. rom goes here if bootseqdone is 0
// note 4000-8fff? is the framebuffer for the screen?
- AM_RANGE(0xff000, 0xfffff) AM_ROM // rom is only banked in here if bootseqdone is 0, so the reset vector is in the proper place
+ AM_RANGE(0xff000, 0xfffff) AM_ROM // rom is only banked in here if bootseqdone is 0, so the reset vector is in the proper place. otherwise the memory control regs live at fffe8-fffef
*/
AM_RANGE(0x00000, 0xfffff) AM_READWRITE(iocpu_r, iocpu_w) // bypass MAME's memory map system as we need finer grained control
ADDRESS_MAP_END
@@ -398,6 +421,15 @@ read from 0x0002 (byte wide) (check interrupts) <looking for vblank int or odd/e
read from 0x44 (byte wide) in a loop forever (read keyboard fifo status)
*/
+/* Emulator CPU */
+/*
+static ADDRESS_MAP_START(notetaker_emulatorcpu_mem, AS_PROGRAM, 16, notetaker_state)
+ AM_RANGE(0x00000, 0x00fff) AM_RAM // actually a banked block of ram
+ AM_RANGE(0x01000, 0x3ffff) AM_MIRROR(0xC0000) AM_RAM AM_BASE("mainram") // 256k of ram (less 4k), shared between both processors, mirrored 4 times
+ AM_RANGE(0xFFFE0, 0xFFFEF) AM_READWRITE(proc_control_r, proc_control_w)
+ADDRESS_MAP_END
+*/
+
/* Machine Reset */
void notetaker_state::machine_reset()
{
diff --git a/src/mame/drivers/pasogo.cpp b/src/mame/drivers/pasogo.cpp
index d88f121264e..28e858e5b5b 100644
--- a/src/mame/drivers/pasogo.cpp
+++ b/src/mame/drivers/pasogo.cpp
@@ -442,7 +442,6 @@ static ADDRESS_MAP_START(emsbank_map, AS_PROGRAM, 16, pasogo_state)
ADDRESS_MAP_END
static ADDRESS_MAP_START(pasogo_mem, AS_PROGRAM, 16, pasogo_state)
- AM_RANGE(0x00000, 0x7ffff) AM_RAMBANK("bank10")
AM_RANGE(0xb8000, 0xbffff) AM_RAM AM_SHARE("vram")
AM_RANGE(0x80000, 0xeffff) AM_READWRITE(emsram_r, emsram_w)
AM_RANGE(0xf0000, 0xfffff) AM_ROMBANK("bank27")
@@ -452,6 +451,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START(pasogo_io, AS_IO, 16, pasogo_state)
AM_RANGE(0x0026, 0x0027) AM_READWRITE8(vg230_io_r, vg230_io_w, 0xffff)
AM_RANGE(0x006c, 0x006f) AM_READWRITE(ems_r, ems_w)
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ibm5160_mb_device, map, 0xffff)
ADDRESS_MAP_END
@@ -521,8 +521,8 @@ void pasogo_state::machine_reset()
std::string region_tag;
ioport_port *color = ioport("COLOR");
m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
- if (!m_cart_rom) // this should never happen, since we make carts mandatory!
- m_cart_rom = memregion("maincpu");
+ if (!m_cart_rom) // even with mandatory carts, debug will crash without anything at the boot vector
+ m_cart_rom = memregion("empty");
membank("bank27")->set_base(m_cart_rom->base());
m_ems_index = 0;
@@ -569,7 +569,7 @@ static MACHINE_CONFIG_START( pasogo, pasogo_state )
MACHINE_CONFIG_END
ROM_START( pasogo )
- ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x10000, "empty", ROMREGION_ERASEFF )
ROM_END
// YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS
diff --git a/src/mame/drivers/pc.cpp b/src/mame/drivers/pc.cpp
index b6836ab5f3a..22f14676a86 100644
--- a/src/mame/drivers/pc.cpp
+++ b/src/mame/drivers/pc.cpp
@@ -57,50 +57,29 @@ public:
static ADDRESS_MAP_START( pc8_map, AS_PROGRAM, 8, pc_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START( zenith_map, AS_PROGRAM, 8, pc_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
AM_RANGE(0xf0000, 0xf7fff) AM_RAM
- AM_RANGE(0xf8000, 0xfffff) AM_ROM
+ AM_RANGE(0xf8000, 0xfffff) AM_ROM AM_REGION("bios", 0x8000)
ADDRESS_MAP_END
-
static ADDRESS_MAP_START( pc16_map, AS_PROGRAM, 16, pc_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xbffff) AM_NOP
- AM_RANGE(0xc0000, 0xc7fff) AM_ROM
- AM_RANGE(0xc8000, 0xcffff) AM_ROM
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( ibm5550_map, AS_PROGRAM, 16, pc_state )
- ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xeffff) AM_RAM
- AM_RANGE(0xfc000, 0xfffff) AM_ROM
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(pc8_io, AS_IO, 8, pc_state )
ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", ibm5160_mb_device, map)
ADDRESS_MAP_END
static ADDRESS_MAP_START(pc16_io, AS_IO, 16, pc_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0070, 0x007f) AM_RAM // needed for Poisk-2
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ibm5160_mb_device, map, 0xffff)
ADDRESS_MAP_END
READ8_MEMBER(pc_state::unk_r)
@@ -111,6 +90,7 @@ READ8_MEMBER(pc_state::unk_r)
static ADDRESS_MAP_START(ibm5550_io, AS_IO, 16, pc_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x00a0, 0x00a1) AM_READ8(unk_r, 0x00ff )
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ibm5160_mb_device, map, 0xffff)
ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(pc_state::pc_turbo_callback)
@@ -201,6 +181,7 @@ static MACHINE_CONFIG_START( pccga, pc_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K")
/* software lists */
MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150")
@@ -229,6 +210,7 @@ static MACHINE_CONFIG_START( iskr3104, pc_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K")
MACHINE_CONFIG_END
@@ -249,6 +231,7 @@ static MACHINE_CONFIG_START( poisk2, pc_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K")
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( zenith, pc_state )
@@ -268,6 +251,7 @@ static MACHINE_CONFIG_START( zenith, pc_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("128K, 256K, 512K")
/* software lists */
MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150")
@@ -294,12 +278,13 @@ static MACHINE_CONFIG_START( siemens, pc_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K")
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( ibm5550, pc_state )
/* basic machine hardware */
- MCFG_CPU_PC(ibm5550, ibm5550, I8086, 8000000)
+ MCFG_CPU_PC(pc16, ibm5550, I8086, 8000000)
MCFG_IBM5160_MOTHERBOARD_ADD("mb", "maincpu")
MCFG_DEVICE_INPUT_DEFAULTS(pccga)
@@ -314,6 +299,7 @@ static MACHINE_CONFIG_START( ibm5550, pc_state )
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED(bondwell, pccga)
@@ -331,149 +317,162 @@ static MACHINE_CONFIG_DERIVED(eagle1600, pccga)
MCFG_CPU_PC(pc16, pc16, I8086, 8000000)
MACHINE_CONFIG_END
+static DEVICE_INPUT_DEFAULTS_START( m15 )
+ DEVICE_INPUT_DEFAULTS("DSW0", 0x30, 0x20) // TODO: document correct dip settings
+ DEVICE_INPUT_DEFAULTS("DSW0", 0x01, 0x00)
+DEVICE_INPUT_DEFAULTS_END
+
+static MACHINE_CONFIG_DERIVED(m15, pccga)
+ MCFG_DEVICE_MODIFY("mb")
+ MCFG_DEVICE_INPUT_DEFAULTS(m15)
+ MCFG_DEVICE_MODIFY(RAM_TAG)
+ MCFG_RAM_DEFAULT_SIZE("448K")
+ MCFG_RAM_EXTRA_OPTIONS("16K, 160K, 304K")
+MACHINE_CONFIG_END
+
ROM_START( bw230 )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD("bondwell.bin", 0xfe000, 0x2000, CRC(d435a405) SHA1(a57c705d1144c7b61940b6f5c05d785c272fc9bb))
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD("bondwell.bin", 0xe000, 0x2000, CRC(d435a405) SHA1(a57c705d1144c7b61940b6f5c05d785c272fc9bb))
ROM_END
ROM_START( sicpc1605 )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD("multitech pc-700 3.1.bin", 0xfe000, 0x2000, CRC(0ac7a2e1) SHA1(b9c8504e21213d81a068dde9f51f9c973d726e7b))
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD("multitech pc-700 3.1.bin", 0xe000, 0x2000, CRC(0ac7a2e1) SHA1(b9c8504e21213d81a068dde9f51f9c973d726e7b))
ROM_END
ROM_START( zdsupers )
- ROM_REGION(0x100000,"maincpu", 0)
+ ROM_REGION(0x10000,"bios", 0)
ROM_SYSTEM_BIOS( 0, "v31d", "v3.1d" )
- ROMX_LOAD( "z184m v3.1d.10d", 0xf8000, 0x8000, CRC(44012c3b) SHA1(f2f28979798874386ca8ba3dd3ead24ae7c2aeb4), ROM_BIOS(1))
+ ROMX_LOAD( "z184m v3.1d.10d", 0x8000, 0x8000, CRC(44012c3b) SHA1(f2f28979798874386ca8ba3dd3ead24ae7c2aeb4), ROM_BIOS(1))
ROM_SYSTEM_BIOS( 1, "v29e", "v2.9e" )
- ROMX_LOAD( "z184m v2.9e.10d", 0xf8000, 0x8000, CRC(de2f200b) SHA1(ad5ce601669a82351e412fc6c1c70c47779a1e55), ROM_BIOS(2))
+ ROMX_LOAD( "z184m v2.9e.10d", 0x8000, 0x8000, CRC(de2f200b) SHA1(ad5ce601669a82351e412fc6c1c70c47779a1e55), ROM_BIOS(2))
ROM_END
ROM_START( dgone )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD( "dgone.bin", 0xf8000, 0x08000, CRC(2c38c86e) SHA1(c0f85a000d1d13cd354965689e925d677822549e))
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD( "dgone.bin", 0x8000, 0x08000, CRC(2c38c86e) SHA1(c0f85a000d1d13cd354965689e925d677822549e))
ROM_END
ROM_START( ssam88s )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD( "samsung_samtron_88s_vers_2.0a.bin", 0xf8000, 0x08000, CRC(d1252a91) SHA1(469d15b6ecd7b70234975dc12c6bda4212a66652))
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD( "samsung_samtron_88s_vers_2.0a.bin", 0x8000, 0x08000, CRC(d1252a91) SHA1(469d15b6ecd7b70234975dc12c6bda4212a66652))
ROM_END
ROM_START( mk88 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
ROM_DEFAULT_BIOS("v392")
ROM_SYSTEM_BIOS(0, "v290", "v2.90")
- ROMX_LOAD( "mk88m.bin", 0xfc000, 0x2000, CRC(09c9da3b) SHA1(d1e7ad23b5f5b3576ad128c1198294129754f39f), ROM_BIOS(1))
- ROMX_LOAD( "mk88b.bin", 0xfe000, 0x2000, CRC(8a922476) SHA1(c19c3644ab92fd12e13f32b410cd26e3c844a03b), ROM_BIOS(1))
+ ROMX_LOAD( "mk88m.bin", 0xc000, 0x2000, CRC(09c9da3b) SHA1(d1e7ad23b5f5b3576ad128c1198294129754f39f), ROM_BIOS(1))
+ ROMX_LOAD( "mk88b.bin", 0xe000, 0x2000, CRC(8a922476) SHA1(c19c3644ab92fd12e13f32b410cd26e3c844a03b), ROM_BIOS(1))
ROM_SYSTEM_BIOS(1, "v391", "v3.91")
- ROMX_LOAD( "mkm.bin", 0xfc000, 0x2000, CRC(65f979e8) SHA1(13e85be9bc8ceb5ab9e559e7d0089e26fbbb84fc), ROM_BIOS(2))
- ROMX_LOAD( "mkb.bin", 0xfe000, 0x2000, CRC(830a0447) SHA1(11bc200fdbcfbbe335f4c282020750c0b5ca4167), ROM_BIOS(2))
+ ROMX_LOAD( "mkm.bin", 0xc000, 0x2000, CRC(65f979e8) SHA1(13e85be9bc8ceb5ab9e559e7d0089e26fbbb84fc), ROM_BIOS(2))
+ ROMX_LOAD( "mkb.bin", 0xe000, 0x2000, CRC(830a0447) SHA1(11bc200fdbcfbbe335f4c282020750c0b5ca4167), ROM_BIOS(2))
ROM_SYSTEM_BIOS(2, "v392", "v3.92")
- ROMX_LOAD( "m88.bin", 0xfc000, 0x2000, CRC(fe1b4e36) SHA1(fcb420af0ff09a7d43fcb9b7d0b0233a2071c159), ROM_BIOS(3))
- ROMX_LOAD( "b88.bin", 0xfe000, 0x2000, CRC(58a418df) SHA1(216398d4e4302ee7efcc2c8f9ff9d8a1161229ea), ROM_BIOS(3))
+ ROMX_LOAD( "m88.bin", 0xc000, 0x2000, CRC(fe1b4e36) SHA1(fcb420af0ff09a7d43fcb9b7d0b0233a2071c159), ROM_BIOS(3))
+ ROMX_LOAD( "b88.bin", 0xe000, 0x2000, CRC(58a418df) SHA1(216398d4e4302ee7efcc2c8f9ff9d8a1161229ea), ROM_BIOS(3))
ROM_END
ROM_START( iskr3104 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
- ROMX_LOAD( "198.bin", 0xfc000, 0x2000, CRC(bcfd8e41) SHA1(e21ddf78839aa51fa5feb23f511ff5e2da31b433),ROM_SKIP(1))
- ROMX_LOAD( "199.bin", 0xfc001, 0x2000, CRC(2da5fe79) SHA1(14d5dccc141a0b3367f7f8a7188306fdf03c2b6c),ROM_SKIP(1))
+ ROM_REGION16_LE(0x10000,"bios", 0)
+ ROMX_LOAD( "198.bin", 0xc000, 0x2000, CRC(bcfd8e41) SHA1(e21ddf78839aa51fa5feb23f511ff5e2da31b433),ROM_SKIP(1))
+ ROMX_LOAD( "199.bin", 0xc001, 0x2000, CRC(2da5fe79) SHA1(14d5dccc141a0b3367f7f8a7188306fdf03c2b6c),ROM_SKIP(1))
// EGA card from Iskra-3104
//ROMX_LOAD( "143-03.bin", 0xc0001, 0x2000, CRC(d0706345) SHA1(e04bb40d944426a4ae2e3a614d3f4953d7132ede),ROM_SKIP(1))
//ROMX_LOAD( "143-02.bin", 0xc0000, 0x2000, CRC(c8c18ebb) SHA1(fd6dac76d43ab8b582e70f1d5cc931d679036fb9),ROM_SKIP(1))
ROM_END
ROM_START( poisk2 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
ROM_SYSTEM_BIOS(0, "v20", "v2.0")
- ROMX_LOAD( "b_p2_20h.rf4", 0xfc001, 0x2000, CRC(d53189b7) SHA1(ace40f1a40642b51fe5d2874acef81e48768b23b), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "b_p2_20l.rf4", 0xfc000, 0x2000, CRC(2d61fcc9) SHA1(11873c8741ba37d6c2fe1f482296aece514b7618), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "b_p2_20h.rf4", 0xc001, 0x2000, CRC(d53189b7) SHA1(ace40f1a40642b51fe5d2874acef81e48768b23b), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "b_p2_20l.rf4", 0xc000, 0x2000, CRC(2d61fcc9) SHA1(11873c8741ba37d6c2fe1f482296aece514b7618), ROM_SKIP(1) | ROM_BIOS(1))
ROM_SYSTEM_BIOS(1, "v21", "v2.1")
- ROMX_LOAD( "b_p2_21h.rf4", 0xfc001, 0x2000, CRC(22197297) SHA1(506c7e63027f734d62ef537f484024548546011f), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "b_p2_21l.rf4", 0xfc000, 0x2000, CRC(0eb2ea7f) SHA1(67bb5fec53ebfa2a5cad2a3d3d595678d6023024), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "b_p2_21h.rf4", 0xc001, 0x2000, CRC(22197297) SHA1(506c7e63027f734d62ef537f484024548546011f), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "b_p2_21l.rf4", 0xc000, 0x2000, CRC(0eb2ea7f) SHA1(67bb5fec53ebfa2a5cad2a3d3d595678d6023024), ROM_SKIP(1) | ROM_BIOS(2))
ROM_SYSTEM_BIOS(2, "v24", "v2.4")
- ROMX_LOAD( "b_p2_24h.rf4", 0xfc001, 0x2000, CRC(ea842c9e) SHA1(dcdbf27374149dae0ef76d410cc6c615d9b99372), ROM_SKIP(1) | ROM_BIOS(3))
- ROMX_LOAD( "b_p2_24l.rf4", 0xfc000, 0x2000, CRC(02f21250) SHA1(f0b133fb4470bddf2f7bf59688cf68198ed8ce55), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD( "b_p2_24h.rf4", 0xc001, 0x2000, CRC(ea842c9e) SHA1(dcdbf27374149dae0ef76d410cc6c615d9b99372), ROM_SKIP(1) | ROM_BIOS(3))
+ ROMX_LOAD( "b_p2_24l.rf4", 0xc000, 0x2000, CRC(02f21250) SHA1(f0b133fb4470bddf2f7bf59688cf68198ed8ce55), ROM_SKIP(1) | ROM_BIOS(3))
ROM_SYSTEM_BIOS(3, "v21d", "v2.1d")
- ROMX_LOAD( "opp2_1h.rf4", 0xfc001, 0x2000, CRC(b7cd7f4f) SHA1(ac473822fb44d7b898d628732cf0a27fcb4d26d6), ROM_SKIP(1) | ROM_BIOS(4))
- ROMX_LOAD( "opp2_1l.rf4", 0xfc000, 0x2000, CRC(1971dca3) SHA1(ecd61cc7952af834d8abc11db372c3e70775489d), ROM_SKIP(1) | ROM_BIOS(4))
+ ROMX_LOAD( "opp2_1h.rf4", 0xc001, 0x2000, CRC(b7cd7f4f) SHA1(ac473822fb44d7b898d628732cf0a27fcb4d26d6), ROM_SKIP(1) | ROM_BIOS(4))
+ ROMX_LOAD( "opp2_1l.rf4", 0xc000, 0x2000, CRC(1971dca3) SHA1(ecd61cc7952af834d8abc11db372c3e70775489d), ROM_SKIP(1) | ROM_BIOS(4))
ROM_SYSTEM_BIOS(4, "v22d", "v2.2d")
- ROMX_LOAD( "opp2_2h.rf4", 0xfc001, 0x2000, CRC(b9e3a5cc) SHA1(0a28afbff612471ee81d69a98789e75253c57a30), ROM_SKIP(1) | ROM_BIOS(5))
- ROMX_LOAD( "opp2_2l.rf4", 0xfc000, 0x2000, CRC(6877aad6) SHA1(1d0031d044beb4f9f321e3c8fdedf57467958900), ROM_SKIP(1) | ROM_BIOS(5))
+ ROMX_LOAD( "opp2_2h.rf4", 0xc001, 0x2000, CRC(b9e3a5cc) SHA1(0a28afbff612471ee81d69a98789e75253c57a30), ROM_SKIP(1) | ROM_BIOS(5))
+ ROMX_LOAD( "opp2_2l.rf4", 0xc000, 0x2000, CRC(6877aad6) SHA1(1d0031d044beb4f9f321e3c8fdedf57467958900), ROM_SKIP(1) | ROM_BIOS(5))
ROM_SYSTEM_BIOS(5, "v23d", "v2.3d")
- ROMX_LOAD( "opp2_3h.rf4", 0xfc001, 0x2000, CRC(ac7d4f06) SHA1(858d6e084a38814280b3e29fb54971f4f532e484), ROM_SKIP(1) | ROM_BIOS(6))
- ROMX_LOAD( "opp2_3l.rf4", 0xfc000, 0x2000, CRC(3c877ea1) SHA1(0753168659653538311c0ad1df851cbbdba426f4), ROM_SKIP(1) | ROM_BIOS(6))
+ ROMX_LOAD( "opp2_3h.rf4", 0xc001, 0x2000, CRC(ac7d4f06) SHA1(858d6e084a38814280b3e29fb54971f4f532e484), ROM_SKIP(1) | ROM_BIOS(6))
+ ROMX_LOAD( "opp2_3l.rf4", 0xc000, 0x2000, CRC(3c877ea1) SHA1(0753168659653538311c0ad1df851cbbdba426f4), ROM_SKIP(1) | ROM_BIOS(6))
ROM_END
ROM_START( mc1702 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
- ROM_LOAD16_BYTE( "2764_2_(573rf4).rom", 0xfc000, 0x2000, CRC(34a0c8fb) SHA1(88dc247f2e417c2848a2fd3e9b52258ad22a2c07))
- ROM_LOAD16_BYTE( "2764_3_(573rf4).rom", 0xfc001, 0x2000, CRC(68ab212b) SHA1(f3313f77392877d28ce290ffa3432f0a32fc4619))
+ ROM_REGION16_LE(0x10000,"bios", 0)
+ ROM_LOAD16_BYTE( "2764_2_(573rf4).rom", 0xc000, 0x2000, CRC(34a0c8fb) SHA1(88dc247f2e417c2848a2fd3e9b52258ad22a2c07))
+ ROM_LOAD16_BYTE( "2764_3_(573rf4).rom", 0xc001, 0x2000, CRC(68ab212b) SHA1(f3313f77392877d28ce290ffa3432f0a32fc4619))
ROM_LOAD( "ba1m_(573rf5).rom", 0x0000, 0x0800, CRC(08d938e8) SHA1(957b6c691dbef75c1c735e8e4e81669d056971e4))
ROM_END
ROM_START( ibm5550 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
- ROM_LOAD( "ipl5550.rom", 0xfc000, 0x4000, CRC(40cf34c9) SHA1(d41f77fdfa787b0e97ed311e1c084b8699a5b197))
+ ROM_REGION16_LE(0x10000,"bios", 0)
+ ROM_LOAD( "ipl5550.rom", 0xc000, 0x4000, CRC(40cf34c9) SHA1(d41f77fdfa787b0e97ed311e1c084b8699a5b197))
ROM_END
ROM_START( pc7000 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
- ROMX_LOAD( "mitsubishi-m5l27128k-1.bin", 0xf8000, 0x4000, CRC(9683957f) SHA1(4569eab6d88eb1bba0d553d1358e593c326978aa), ROM_SKIP(1))
- ROMX_LOAD( "mitsubishi-m5l27128k-2.bin", 0xf8001, 0x4000, CRC(99b229a4) SHA1(5800c8bafed26873d8cfcc79a05f93a780a31c91), ROM_SKIP(1))
+ ROM_REGION16_LE(0x10000,"bios", 0)
+ ROMX_LOAD( "mitsubishi-m5l27128k-1.bin", 0x8000, 0x4000, CRC(9683957f) SHA1(4569eab6d88eb1bba0d553d1358e593c326978aa), ROM_SKIP(1))
+ ROMX_LOAD( "mitsubishi-m5l27128k-2.bin", 0x8001, 0x4000, CRC(99b229a4) SHA1(5800c8bafed26873d8cfcc79a05f93a780a31c91), ROM_SKIP(1))
ROM_END
ROM_START( olivm15 )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD( "oliv_m15.bin",0xfc000, 0x04000, CRC(bf2ef795) SHA1(02d497131f5ca2c78f2accd38ab0eab6813e3ebf))
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD( "oliv_m15.bin",0xc000, 0x04000, CRC(bf2ef795) SHA1(02d497131f5ca2c78f2accd38ab0eab6813e3ebf))
ROM_END
ROM_START( sx16 )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD( "tmm27128ad.bin",0xfc000, 0x4000, CRC(f8543362) SHA1(fef625e260ca89ba02174584bdc12db609f0780e))
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD( "tmm27128ad.bin",0xc000, 0x4000, CRC(f8543362) SHA1(fef625e260ca89ba02174584bdc12db609f0780e))
ROM_END
ROM_START( compc1 )
- ROM_REGION(0x100000, "maincpu", 0)
- ROM_LOAD("380270-01.bin", 0xfc000, 0x4000, BAD_DUMP CRC(75135d37) SHA1(177283642240fee191ba2d87e1d0c2a377c78ccb))
+ ROM_REGION(0x10000, "bios", 0)
+ ROM_LOAD("380270-01.bin", 0xc000, 0x4000, BAD_DUMP CRC(75135d37) SHA1(177283642240fee191ba2d87e1d0c2a377c78ccb))
ROM_REGION(0x8000, "gfx1", 0)
ROM_LOAD("pc1_char.bin", 0x0000, 0x8000, CRC(4773a945) SHA1(bcc38abecc75d3f641d42987cb0d2ed71d71bc4c))
ROM_END
// Note: Commodore PC20-III, PC10-III and COLT share the same BIOS
ROM_START( pc10iii )
- ROM_REGION(0x100000, "maincpu", 0)
+ ROM_REGION(0x10000, "bios", 0)
ROM_DEFAULT_BIOS("v441")
ROM_SYSTEM_BIOS(0, "v435", "v4.35")
- ROMX_LOAD("318085-01.u201", 0xf8000, 0x8000, NO_DUMP, ROM_BIOS(1))
+ ROMX_LOAD("318085-01.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(1))
ROM_SYSTEM_BIOS(1, "v436", "v4.36")
- ROMX_LOAD("318085-02.u201", 0xf8000, 0x8000, NO_DUMP, ROM_BIOS(2))
+ ROMX_LOAD("318085-02.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(2))
ROM_SYSTEM_BIOS(2, "v436c", "v4.36c")
- ROMX_LOAD("318085-04.u201", 0xf8000, 0x8000, NO_DUMP, ROM_BIOS(3))
+ ROMX_LOAD("318085-04.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(3))
ROM_SYSTEM_BIOS(3, "v438", "v4.38")
- ROMX_LOAD("318085-05.u201", 0xf8000, 0x8000, CRC(ae9e6a31) SHA1(853ee251cf230818c407a8d13ef060a21c90a8c1), ROM_BIOS(4))
+ ROMX_LOAD("318085-05.u201", 0x8000, 0x8000, CRC(ae9e6a31) SHA1(853ee251cf230818c407a8d13ef060a21c90a8c1), ROM_BIOS(4))
ROM_SYSTEM_BIOS(4, "v439", "v4.39")
- ROMX_LOAD("318085-06.u201", 0xf8000, 0x8000, NO_DUMP, ROM_BIOS(5))
+ ROMX_LOAD("318085-06.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(5))
ROM_SYSTEM_BIOS(5, "v440", "v4.40")
- ROMX_LOAD("318085-07.u201", 0xf8000, 0x8000, NO_DUMP, ROM_BIOS(6))
+ ROMX_LOAD("318085-07.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(6))
ROM_SYSTEM_BIOS(6, "v441", "v4.41")
- ROMX_LOAD("318085-08.u201", 0xf8000, 0x8000, CRC(7e228dc8) SHA1(958dfdd637bd31c01b949fac729d6973a7e630bc), ROM_BIOS(7))
+ ROMX_LOAD("318085-08.u201", 0x8000, 0x8000, CRC(7e228dc8) SHA1(958dfdd637bd31c01b949fac729d6973a7e630bc), ROM_BIOS(7))
ROM_REGION(0x8000, "gfx1", 0)
ROM_LOAD("318086-02.u607", 0x0000, 0x8000, CRC(b406651c) SHA1(856f58353391a74a06ebb8ec9f8333d7d69e5fd6))
//ROM_LOAD("5788005.u33", 0x00000, 0x2000, BAD_DUMP CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) /* temp so you can read the text */
ROM_END
ROM_START( mbc16 )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD( "mbc16.bin", 0xfc000, 0x4000, CRC(f3e0934a) SHA1(e4b91c3d395be0414e20f23ad4919b8ac52639b2))
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD( "mbc16.bin", 0xc000, 0x4000, CRC(f3e0934a) SHA1(e4b91c3d395be0414e20f23ad4919b8ac52639b2))
ROM_REGION(0x2000,"gfx1", 0)
//ATI Graphics Solution SR (graphics card, need to make it ISA card)
ROM_LOAD( "atigssr.bin", 0x0000, 0x2000, CRC(aca81498) SHA1(0d84c89487ee7a6ac4c9e73fdb30c5fd8aa595f8))
ROM_END
ROM_START( ataripc3 )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD( "c101701-004 308.u61",0xf8000, 0x8000, CRC(929a2443) SHA1(8e98f3c9180c55b1f5521727779c016083d27960))
+ ROM_REGION(0x10000,"bios", 0)
+ ROM_LOAD( "c101701-004 308.u61",0x8000, 0x8000, CRC(929a2443) SHA1(8e98f3c9180c55b1f5521727779c016083d27960))
ROM_REGION(0x8000,"gfx1", 0)
ROM_LOAD("5788005.u33", 0x00000, 0x2000, BAD_DUMP CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) // not the real character ROM
@@ -483,9 +482,9 @@ ROM_START( ataripc3 )
ROM_END
ROM_START( eagle1600 )
- ROM_REGION(0x100000,"maincpu", 0)
- ROMX_LOAD( "eagle 1600 62-2732-001 rev e u403.bin",0xfe000, 0x1000, CRC(3da1e96a) SHA1(77861ba5ebd056da1daf048f5abd459e0528666d), ROM_SKIP(1))
- ROMX_LOAD( "eagle 1600 62-2732-002 rev e u404.bin",0xfe001, 0x1000, CRC(be6492d4) SHA1(ef25faf33e8336121d030e38e177be39be8afb7a), ROM_SKIP(1))
+ ROM_REGION(0x10000,"bios", 0)
+ ROMX_LOAD( "eagle 1600 62-2732-001 rev e u403.bin",0xe000, 0x1000, CRC(3da1e96a) SHA1(77861ba5ebd056da1daf048f5abd459e0528666d), ROM_SKIP(1))
+ ROMX_LOAD( "eagle 1600 62-2732-002 rev e u404.bin",0xe001, 0x1000, CRC(be6492d4) SHA1(ef25faf33e8336121d030e38e177be39be8afb7a), ROM_SKIP(1))
ROM_REGION(0x8000,"gfx1", 0)
ROM_LOAD("eagle 1600 video char gen u301.bin", 0x00000, 0x1000, CRC(1a7e552f) SHA1(749058783eec9d96a70dc5fdbfccb56196f889dc))
@@ -512,7 +511,7 @@ COMP( 1990, mc1702, ibm5150, 0, pccga, pccga, driver_device
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( 198?, olivm15, ibm5150, 0, pccga, pccga, driver_device, 0, "Olivetti", "M15", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) // is this a pc clone or not?
+COMP( 198?, olivm15, ibm5150, 0, m15, pccga, driver_device, 0, "Olivetti", "M15", 0)
COMP( 1983, ibm5550, ibm5150, 0, ibm5550, pccga, driver_device, 0, "International Business Machines", "IBM 5550", MACHINE_NOT_WORKING)
@@ -521,6 +520,6 @@ COMP( 1985, pc7000, ibm5150, 0, pccga, pccga, driver_device
COMP( 1988, sx16, ibm5150, 0, pccga, pccga, driver_device, 0, "Sanyo", "SX-16", MACHINE_NOT_WORKING)
COMP( 198?, mbc16, ibm5150, 0, pccga, pccga, driver_device, 0, "Sanyo", "MBC-16" , MACHINE_NOT_WORKING)
-COMP( 198?, ataripc3, ibm5150, 0, pccga, pccga, driver_device, 0, "Atari", "PC-3" , MACHINE_NOT_WORKING)
+COMP( 198?, ataripc3, ibm5150, 0, pccga, pccga, driver_device, 0, "Atari", "PC-3" , 0)
COMP( 1989, ssam88s, ibm5150, 0, pccga, pccga, driver_device, 0, "Samsung", "Samtron 88S" , MACHINE_NOT_WORKING)
COMP( 1983, eagle1600, ibm5150, 0, eagle1600, pccga, driver_device, 0, "Eagle", "1600" , MACHINE_NOT_WORKING)
diff --git a/src/mame/drivers/peplus.cpp b/src/mame/drivers/peplus.cpp
index fa19b702e7b..08ee154c2c4 100644
--- a/src/mame/drivers/peplus.cpp
+++ b/src/mame/drivers/peplus.cpp
@@ -6945,9 +6945,8 @@ Currently stalls with "PRINTER ERROR"
ROM_LOAD( "mxo-cg1209.u75", 0x18000, 0x8000, CRC(da344256) SHA1(1320c4a8b48a9e61a4607e0a9d08083fde2bd334) )
ROM_REGION( 0x100, "proms", 0 )
- ROM_LOAD( "cap1144.u50", 0x0000, 0x0100, NO_DUMP )
- ROM_LOAD( "cap1426.u50", 0x0000, 0x0100, CRC(6c7c3462) SHA1(b5481b548f4db460d27a4bfebb08188f36ca0c11) )
-
+ ROM_LOAD( "cap1144.u50", 0x0000, 0x0100, CRC(c80e88ef) SHA1(51c62a07f660a2f3be46a8fbb5af01cff2660e8d) )
+
ROM_REGION( 0x1000, "printer", 0 ) /* ROM from the printer driver PCB */
ROM_LOAD( "lp_86.u9", 0x0000, 0x1000, CRC(cdd93c06) SHA1(96f0a6e231f355a0b82bb0e1e698edbd66ff3020) ) /* 2732 EPROM */
ROM_END
diff --git a/src/mame/drivers/poisk1.cpp b/src/mame/drivers/poisk1.cpp
index 0ac808a8553..96381face12 100644
--- a/src/mame/drivers/poisk1.cpp
+++ b/src/mame/drivers/poisk1.cpp
@@ -10,14 +10,24 @@
#include "emu.h"
-#include "includes/poisk1.h"
#include "machine/kb_poisk1.h"
+#include "video/cgapal.h"
+#include "imagedev/cassette.h"
+#include "machine/i8255.h"
+#include "bus/isa/isa.h"
+#include "machine/pic8259.h"
+#include "machine/pit8253.h"
+#include "machine/ram.h"
+#include "bus/isa/xsu_cards.h"
+#include "sound/speaker.h"
#include "cpu/i86/i86.h"
#define CGA_PALETTE_SETS 83
/* one for colour, one for mono, 81 for colour composite */
+#define BG_COLOR(x) (((x) & 7)|(((x) & 0x10) >> 1))
+
#define VERBOSE_DBG 0
#define DBG_LOG(N,M,A) \
@@ -30,10 +40,380 @@
} \
} while (0)
+#define POISK1_UPDATE_ROW(name) \
+ void name(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride)
+
+class p1_state : public driver_device
+{
+public:
+ p1_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_pic8259(*this, "pic8259"),
+ m_pit8253(*this, "pit8253"),
+ m_ppi8255n1(*this, "ppi8255n1"),
+ m_ppi8255n2(*this, "ppi8255n2"),
+ m_isabus(*this, "isa"),
+ m_speaker(*this, "speaker"),
+ m_cassette(*this, "cassette"),
+ m_ram(*this, RAM_TAG),
+ m_palette(*this, "palette") { }
+
+ required_device<cpu_device> m_maincpu;
+ required_device<pic8259_device> m_pic8259;
+ required_device<pit8253_device> m_pit8253;
+ required_device<i8255_device> m_ppi8255n1;
+ required_device<i8255_device> m_ppi8255n2;
+ required_device<isa8_device> m_isabus;
+ required_device<speaker_sound_device> m_speaker;
+ required_device<cassette_image_device> m_cassette;
+ required_device<ram_device> m_ram;
+ required_device<palette_device> m_palette;
+
+ DECLARE_DRIVER_INIT(poisk1);
+ DECLARE_MACHINE_START(poisk1);
+ DECLARE_MACHINE_RESET(poisk1);
+
+ DECLARE_PALETTE_INIT(p1);
+ virtual void video_start() override;
+ UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void set_palette_luts();
+ POISK1_UPDATE_ROW(cga_gfx_2bpp_update_row);
+ POISK1_UPDATE_ROW(cga_gfx_1bpp_update_row);
+ POISK1_UPDATE_ROW(poisk1_gfx_1bpp_update_row);
+
+ DECLARE_WRITE_LINE_MEMBER(p1_pit8253_out2_changed);
+ DECLARE_WRITE_LINE_MEMBER(p1_speaker_set_spkrdata);
+ UINT8 m_p1_spkrdata;
+ UINT8 m_p1_input;
+
+ UINT8 m_kbpoll_mask;
+
+ struct
+ {
+ UINT8 trap[4];
+ std::unique_ptr<UINT8[]> videoram_base;
+ UINT8 *videoram;
+ UINT8 mode_control_6a;
+ UINT8 color_select_68;
+ UINT8 palette_lut_2bpp[4];
+ int stride;
+ void *update_row(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride);
+ } m_video;
+
+ DECLARE_READ8_MEMBER(p1_trap_r);
+ DECLARE_WRITE8_MEMBER(p1_trap_w);
+ DECLARE_READ8_MEMBER(p1_cga_r);
+ DECLARE_WRITE8_MEMBER(p1_cga_w);
+ DECLARE_WRITE8_MEMBER(p1_vram_w);
+
+ DECLARE_READ8_MEMBER(p1_ppi_r);
+ DECLARE_WRITE8_MEMBER(p1_ppi_w);
+ DECLARE_WRITE8_MEMBER(p1_ppi_porta_w);
+ DECLARE_READ8_MEMBER(p1_ppi_porta_r);
+ DECLARE_READ8_MEMBER(p1_ppi_portb_r);
+ DECLARE_READ8_MEMBER(p1_ppi_portc_r);
+ DECLARE_WRITE8_MEMBER(p1_ppi_portc_w);
+ DECLARE_WRITE8_MEMBER(p1_ppi2_porta_w);
+ DECLARE_WRITE8_MEMBER(p1_ppi2_portb_w);
+ DECLARE_READ8_MEMBER(p1_ppi2_portc_r);
+ const char *m_cputag;
+};
+
/*
* onboard devices:
*/
+/*
+ * Poisk-1 doesn't have a mc6845 and always runs in graphics mode. Text mode is emulated by BIOS;
+ * NMI is triggered on access to video memory and to mc6845 ports. Address and data are latched into:
+ *
+ * Port 28H (offset 0) -- lower 8 bits of address
+ * Port 29H (offset 1) -- high -//- and mode bits
+ * Port 2AH (offset 2) -- data
+ */
+
+READ8_MEMBER(p1_state::p1_trap_r)
+{
+ UINT8 data = m_video.trap[offset];
+ DBG_LOG(1,"trap",("R %.2x $%02x\n", 0x28+offset, data));
+ if (offset == 0)
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
+ return data;
+}
+
+WRITE8_MEMBER(p1_state::p1_trap_w)
+{
+ DBG_LOG(1,"trap",("W %.2x $%02x\n", 0x28+offset, data));
+}
+
+READ8_MEMBER(p1_state::p1_cga_r)
+{
+ m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
+ return 0;
+}
+
+WRITE8_MEMBER(p1_state::p1_cga_w)
+{
+ UINT16 port = offset + 0x3d0;
+
+ DBG_LOG(1,"cga",("W %.4x $%02x\n", port, data));
+ m_video.trap[2] = data;
+ m_video.trap[1] = 0xC0 | ((port >> 8) & 0x3f);
+ m_video.trap[0] = port & 255;
+ m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
+}
+
+WRITE8_MEMBER(p1_state::p1_vram_w)
+{
+ DBG_LOG(1,"vram",("W %.4x $%02x\n", offset, data));
+ if (m_video.videoram_base)
+ m_video.videoram_base[offset] = data;
+ m_video.trap[2] = data;
+ m_video.trap[1] = 0x80 | ((offset >> 8) & 0x3f);
+ m_video.trap[0] = offset & 255;
+ m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
+}
+
+// CGA emulator
+/*
+068h D42 0..2 R, G, B XXX Foreground/Background color
+ 3 NMI DISABLE NMI trap 1: Disabled 0: Enabled
+ 4 PALETTE XXX Colour palette 0: XXX 1: XXX
+ 5 I (INTENS) XXX Foreground/Background color intensity
+ 6 DISPLAY BANK XXX Video RAM page
+ 7 HIRES 1: 640x200 0: 320x200
+*/
+
+WRITE8_MEMBER(p1_state::p1_ppi2_porta_w)
+{
+ address_space &space_prg = m_maincpu->space(AS_PROGRAM);
+
+ DBG_LOG(1,"color_select_68",("W $%02x\n", data));
+
+ // NMI DISABLE
+ if (BIT(data, 3) != BIT(m_video.color_select_68, 3)) {
+ if (BIT(data, 3)) {
+ space_prg.install_readwrite_bank( 0xb8000, 0xbbfff, "bank11" );
+ } else {
+ space_prg.install_read_bank( 0xb8000, 0xbbfff, "bank11" );
+ space_prg.install_write_handler( 0xb8000, 0xbbfff, WRITE8_DELEGATE(p1_state, p1_vram_w) );
+ }
+ }
+ // DISPLAY BANK
+ if (BIT(data, 6) != BIT(m_video.color_select_68, 6)) {
+ if (BIT(data, 6))
+ m_video.videoram = m_video.videoram_base.get() + 0x4000;
+ else
+ m_video.videoram = m_video.videoram_base.get();
+ }
+ // HIRES -- XXX
+ if (BIT(data, 7) != BIT(m_video.color_select_68, 7)) {
+ if (BIT(data, 7))
+ machine().first_screen()->set_visible_area(0, 640-1, 0, 200-1);
+ else
+ machine().first_screen()->set_visible_area(0, 320-1, 0, 200-1);
+ }
+ m_video.color_select_68 = data;
+ set_palette_luts();
+}
+
+/*
+06Ah Dxx 6 Enable/Disable color burst (?)
+ 7 Enable/Disable D7H/D7L
+*/
+
+WRITE8_MEMBER(p1_state::p1_ppi_portc_w)
+{
+ DBG_LOG(1,"mode_control_6a",("W $%02x\n", data));
+
+ m_video.mode_control_6a = data;
+ set_palette_luts();
+}
+
+void p1_state::set_palette_luts(void)
+{
+ /* Setup 2bpp palette lookup table */
+ // HIRES
+ if ( m_video.color_select_68 & 0x80 )
+ {
+ m_video.palette_lut_2bpp[0] = 0;
+ }
+ else
+ {
+ m_video.palette_lut_2bpp[0] = BG_COLOR(m_video.color_select_68);
+ }
+ // B&W -- XXX
+/*
+ if ( m_video.mode_control_6a & 0x40 )
+ {
+ m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 3;
+ m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 4;
+ m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 7;
+ }
+ else
+*/
+ {
+ // PALETTE
+ if ( m_video.color_select_68 & 0x20 )
+ {
+ m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 3;
+ m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 5;
+ m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 7;
+ }
+ else
+ {
+ m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 2;
+ m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 4;
+ m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 6;
+ }
+ }
+}
+
+/***************************************************************************
+ Draw graphics mode with 320x200 pixels (default) with 2 bits/pixel.
+ Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000
+ cga fetches 2 byte per mc6845 access.
+***************************************************************************/
+
+POISK1_UPDATE_ROW( p1_state::cga_gfx_2bpp_update_row )
+{
+ const rgb_t *palette = m_palette->palette()->entry_list_raw();
+ UINT32 *p = &bitmap.pix32(ra);
+ UINT16 odd, offset;
+ int i;
+
+ if ( ra == 0 ) DBG_LOG(1,"cga_gfx_2bpp_update_row",("\n"));
+ odd = ( ra & 1 ) << 13;
+ offset = ( ma & 0x1fff ) | odd;
+ for ( i = 0; i < stride; i++ )
+ {
+ UINT8 data = videoram[ offset++ ];
+
+ *p = palette[m_video.palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]]; p++;
+ *p = palette[m_video.palette_lut_2bpp[ ( data >> 4 ) & 0x03 ]]; p++;
+ *p = palette[m_video.palette_lut_2bpp[ ( data >> 2 ) & 0x03 ]]; p++;
+ *p = palette[m_video.palette_lut_2bpp[ data & 0x03 ]]; p++;
+ }
+}
+
+/***************************************************************************
+ Draw graphics mode with 640x200 pixels (default).
+ The cell size is 1x1 (1 scanline is the real default)
+ Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000
+***************************************************************************/
+
+POISK1_UPDATE_ROW( p1_state::cga_gfx_1bpp_update_row )
+{
+ const rgb_t *palette = m_palette->palette()->entry_list_raw();
+ UINT32 *p = &bitmap.pix32(ra);
+ UINT8 fg = 15, bg = BG_COLOR(m_video.color_select_68);
+ UINT16 odd, offset;
+ int i;
+
+ if ( ra == 0 ) DBG_LOG(1,"cga_gfx_1bpp_update_row",("bg %d\n", bg));
+ odd = ( ra & 1 ) << 13;
+ offset = ( ma & 0x1fff ) | odd;
+ for ( i = 0; i < stride; i++ )
+ {
+ UINT8 data = videoram[ offset++ ];
+
+ *p = palette[( data & 0x80 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x40 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x20 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x10 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x08 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x04 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x02 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x01 ) ? fg : bg ]; p++;
+ }
+}
+
+/***************************************************************************
+ Draw graphics mode with 640x200 pixels + extra highlight color for text
+ mode emulation
+ Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000
+***************************************************************************/
+
+POISK1_UPDATE_ROW( p1_state::poisk1_gfx_1bpp_update_row )
+{
+ const rgb_t *palette = m_palette->palette()->entry_list_raw();
+ UINT32 *p = &bitmap.pix32(ra);
+ UINT8 fg, bg = BG_COLOR(m_video.color_select_68);
+ UINT16 odd, offset;
+ int i;
+
+ if ( ra == 0 ) DBG_LOG(1,"poisk1_gfx_1bpp_update_row",("bg %d\n", bg));
+ odd = ( ra & 1 ) << 13;
+ offset = ( ma & 0x1fff ) | odd;
+ for ( i = 0; i < stride; i++ )
+ {
+ UINT8 data = videoram[ offset++ ];
+
+ fg = (data & 0x80) ? ( (m_video.color_select_68 & 0x20) ? 10 : 11 ) : 15; // XXX
+ *p = palette[bg]; p++;
+ *p = palette[( data & 0x40 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x20 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x10 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x08 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x04 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x02 ) ? fg : bg ]; p++;
+ *p = palette[( data & 0x01 ) ? fg : bg ]; p++;
+ }
+}
+
+/* Initialise the cga palette */
+PALETTE_INIT_MEMBER(p1_state, p1)
+{
+ int i;
+
+ DBG_LOG(0,"init",("palette_init()\n"));
+
+ for ( i = 0; i < CGA_PALETTE_SETS * 16; i++ )
+ {
+ palette.set_pen_color(i, cga_palette[i][0], cga_palette[i][1], cga_palette[i][2] );
+ }
+}
+
+void p1_state::video_start()
+{
+ address_space &space = m_maincpu->space( AS_PROGRAM );
+
+ DBG_LOG(0,"init",("video_start()\n"));
+
+ memset(&m_video, 0, sizeof(m_video));
+ m_video.videoram_base = std::make_unique<UINT8[]>(0x8000);
+ m_video.videoram = m_video.videoram_base.get();
+ m_video.stride = 80;
+
+ space.install_readwrite_bank(0xb8000, 0xbffff, "bank11" );
+ machine().root_device().membank("bank11")->set_base(m_video.videoram);
+}
+
+UINT32 p1_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ UINT16 ra, ma = 0;
+
+ if (!m_video.stride || !m_video.videoram) return 0;
+
+ // bit 6 of 6Ah disables color burst -- not implemented
+ for (ra = cliprect.min_y; ra <= cliprect.max_y; ra++)
+ {
+ if (BIT(m_video.color_select_68, 7)) {
+ if (BIT(m_video.mode_control_6a, 7)) {
+ cga_gfx_1bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride);
+ } else {
+ poisk1_gfx_1bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride);
+ }
+ } else {
+ cga_gfx_2bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride);
+ }
+ if (ra & 1) ma += m_video.stride;
+ }
+
+ return 0;
+}
+
// Timer. Poisk-1 uses single XTAL for everything? -- check
WRITE_LINE_MEMBER( p1_state::p1_speaker_set_spkrdata )
@@ -177,7 +557,6 @@ DRIVER_INIT_MEMBER( p1_state, poisk1 )
DBG_LOG(0,"init",("driver_init()\n"));
- program.unmap_readwrite(0, 0x7ffff);
program.install_readwrite_bank(0, m_ram->size()-1, "bank10");
membank( "bank10" )->set_base( m_ram->pointer() );
}
@@ -200,10 +579,7 @@ MACHINE_RESET_MEMBER( p1_state, poisk1 )
static ADDRESS_MAP_START( poisk1_map, AS_PROGRAM, 8, p1_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00000, 0x7ffff) AM_RAM
- AM_RANGE(0xc0000, 0xc1fff) AM_ROM
- AM_RANGE(0xc0000, 0xfbfff) AM_NOP
- AM_RANGE(0xfc000, 0xfffff) AM_ROM
+ AM_RANGE(0xfc000, 0xfffff) AM_ROM AM_REGION("bios", 0xc000)
ADDRESS_MAP_END
static ADDRESS_MAP_START( poisk1_io, AS_IO, 8, p1_state )
@@ -238,7 +614,7 @@ static MACHINE_CONFIG_START( poisk1, p1_state )
MCFG_PIT8253_CLK2(XTAL_15MHz/12) /* pio port c pin 4, and speaker polling enough */
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(p1_state, p1_pit8253_out2_changed))
- MCFG_PIC8259_ADD( "pic8259", INPUTLINE(":maincpu", 0), VCC, NULL )
+ MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NULL )
MCFG_DEVICE_ADD("ppi8255n1", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(READ8(p1_state, p1_ppi_porta_r)) /*60H*/
@@ -285,15 +661,15 @@ static MACHINE_CONFIG_START( poisk1, p1_state )
MACHINE_CONFIG_END
ROM_START( poisk1 )
- ROM_REGION16_LE(0x100000,"maincpu", 0)
+ ROM_REGION16_LE(0x10000,"bios", 0)
ROM_DEFAULT_BIOS("v91")
ROM_SYSTEM_BIOS(0, "v89", "1989")
- ROMX_LOAD( "biosp1s.rf4", 0xfe000, 0x2000, CRC(1a85f671) SHA1(f0e59b2c4d92164abca55a96a58071ce869ff988), ROM_BIOS(1))
+ ROMX_LOAD( "biosp1s.rf4", 0xe000, 0x2000, CRC(1a85f671) SHA1(f0e59b2c4d92164abca55a96a58071ce869ff988), ROM_BIOS(1))
ROM_SYSTEM_BIOS(1, "v91", "1991")
- ROMX_LOAD( "poisk_1991.bin", 0xfe000, 0x2000, CRC(d61c56fd) SHA1(de202e1f7422d585a1385a002a4fcf9d756236e5), ROM_BIOS(2))
+ ROMX_LOAD( "poisk_1991.bin", 0xe000, 0x2000, CRC(d61c56fd) SHA1(de202e1f7422d585a1385a002a4fcf9d756236e5), ROM_BIOS(2))
ROM_SYSTEM_BIOS(2, "v91r2", "1991r2")
- ROMX_LOAD( "p_bios_nm.bin", 0xfe000, 0x2000, CRC(84430b4f) SHA1(3e477962be3cea09662cb2e3ad9966ad01c7455d), ROM_BIOS(3))
+ ROMX_LOAD( "p_bios_nm.bin", 0xe000, 0x2000, CRC(84430b4f) SHA1(3e477962be3cea09662cb2e3ad9966ad01c7455d), ROM_BIOS(3))
// 0xc0000, sets 80x25 text and loops asking for 'Boot from hard disk (Y or N)?'
ROM_LOAD( "boot_net.rf4", 0x00000, 0x2000, CRC(316c2030) SHA1(d043325596455772252e465b85321f1b5c529d0b)) // NET BIOS
diff --git a/src/mame/drivers/popper.cpp b/src/mame/drivers/popper.cpp
index 42a79abdfe9..d0fa2557645 100644
--- a/src/mame/drivers/popper.cpp
+++ b/src/mame/drivers/popper.cpp
@@ -1,5 +1,8 @@
-// license:???
-// copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+// **** SKELETON DRIVER **** original removed due to unresolved licensing.
+
/***************************************************************************
Popper
@@ -24,358 +27,26 @@
8910 SW2 SW1 p.m4 p.m3
-Notes:
-
-- a lower interleave causes some sounds to miss, different interleave values
- change random elements eg position of falling logs, it may be enough to
- synchronise the cpus on read/writes to the 0xdd00/0f range
-
-- it's possible that the two score rows shouldn't be overlaid or shouldn't be
- drawn at all times, the only time there is anything underneath is the colour
- bars on the startup screen
-
-- on odd/bonus levels the chars are not aligned with the sprites when the pylons
- are initially drawn (too low) resulting in the top 3 pylons being black, as
- the pylons move up the screen the chars go out of alignment again (this time
- too high) for a single frame to show another glitch
-
-- front to back ordering of object/enemy sprites appears wrong
-
-- on even levels the front most balloon carrying new enemies swaps between the
- left and middle one, clipping to 16 pixel strips solves this but causes other
- obvious sprite drawing errors
-
-- balloon sprites not displayed on high score entry due to the way videoram is
- being drawn, possibly trying to create a stencil effect
-
-- bursting a balloon on bonus levels just before dying from a log causes a
- sprite glitch for a few frames and then a 9999 point bonus
-
-- reads from 0xffff appear to be a harmless bug in the code that initialises
- memory blocks for enemies on odd levels, it goes on to read from 0x001f,
- 0x003f, 0x005f, 0x007f in the rom before giving up
-
-- a reset while a game is in progress or with credits inserted shows a
- "sorry!! over run" message instead of the test screen during startup,
- looks like the game assumes the reset was caused by the watchdog after a
- hang/crash and is apologising to the player for the loss of their game
-
-- title screen sprite colour glitch in lower right corner of the large pylon
- when an even level was shown before, caused by the game trying to colour
- the top of the pylon in the same way as for odd levels
-
-- enemies stop moving on even levels on rare occasions
-
-- enemy sprites entering from the bridges on odd levels are clipped by a
- few pixels at the top, this would happen even without the overlay as the
- first few rows of videoram are high priority solid chars most of the time
-
-- unknown 0xe002 writes, on for title and level 2 off for all else, looks
- to be graphic related
-
-- bottom of screen is scrappy on odd levels, amongst other things the sprites
- leave early, screen size could be clipped tighter or there could be some
- special handling needed, possibly tied to the 0xe002 writes
-
-- the game freezes in much the same way as the stop dip switch when the coin
- inputs are high (a short PORT_IMPULSE duration will still cause a hitch),
- so potentially there's a coin lockout mechanism
-
***************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
-#include "sound/ay8910.h"
-#include "includes/popper.h"
-
-
-/*************************************
- *
- * Memory handlers
- *
- *************************************/
-//e000 e001 e002 e003
-//76543210 76543210 76543210 76543210
-//x------- unused x------- unused x------- unused x------- unused
-//-x------ dsw1:1 -x------ dsw1:2 -x------ dsw1:3 -x------ dsw1:4
-//--x----- unused --x----- unused --x----- unused --x----- unused
-//---x---- dsw2:1 ---x---- dsw2:2 ---x---- dsw2:3 ---x---- dsw2:4
-//----x--- service ----xxxx p1 udlr ----x--- unused ----xxxx p2 udlr
-//-----x-- coin a -----x-- coin b
-//------x- start 1 ------x- start 2
-//-------x p1 b1 -------x p2 b1
-//
-//e004 e005 e006 e007
-//x------- dsw1:5 x------- dsw1:6 x------- dsw1:7 x------- dsw1:8
-//-x------ unused -x------ unused -x------ unused -x------ unused
-//--x----- dsw2:5 --x----- dsw2:6 --x----- dsw2:7 --x----- dsw2:8
-//---xxxxx unused ---xxxxx unused ---xxxxx unused ---xxxxx unused
-//
-//dsw1 dsw2
-//87654321 87654321
-//xx------ extra x------- stop
-//--xx---- poppers -x------ clear (current level)
-//----xx-- coin b --x----- upright (cabinet)
-//------xx coin a ---x---- crt dir. (flip screen)
-// ----x--- pass (unlimited lives)
-// -----x-- free play
-// ------x- continue
-// -------x sound
-READ8_MEMBER(popper_state::popper_input_ports_r)
-{
- UINT8 data = 0;
- switch (offset)
- {
- // player inputs dsw1 dsw2
- case 0: data = ioport("IN0")->read() | ((ioport("DSW1")->read() & 0x02) << 5) | ((ioport("DSW2")->read() & 0x01) << 4); break;
- case 1: data = ioport("IN1")->read() | ((ioport("DSW1")->read() & 0x01) << 6) | ((ioport("DSW2")->read() & 0x02) << 3); break;
- case 2: data = ioport("IN2")->read() | ((ioport("DSW1")->read() & 0x08) << 3) | ((ioport("DSW2")->read() & 0x04) << 2); break;
- case 3: data = ioport("IN3")->read() | ((ioport("DSW1")->read() & 0x04) << 4) | ((ioport("DSW2")->read() & 0x08) << 1); break;
- case 4: data = ((ioport("DSW1")->read() & 0x20) << 2) | ((ioport("DSW2")->read() & 0x10) << 1); break;
- case 5: data = ((ioport("DSW1")->read() & 0x10) << 3) | ((ioport("DSW2")->read() & 0x20) << 0); break;
- case 6: data = ((ioport("DSW1")->read() & 0x80) << 0) | ((ioport("DSW2")->read() & 0x40) >> 1); break;
- case 7: data = ((ioport("DSW1")->read() & 0x40) << 1) | ((ioport("DSW2")->read() & 0x80) >> 2); break;
- }
- return data;
-}
-
-READ8_MEMBER(popper_state::popper_soundcpu_nmi_r)
-{
- m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
- return 0;
-}
-WRITE8_MEMBER(popper_state::nmi_mask_w)
+class popper_state : public driver_device
{
- m_nmi_mask = data & 1;
-}
-
-
-/*************************************
- *
- * Memory maps
- *
- *************************************/
-
-static ADDRESS_MAP_START( popper_map, AS_PROGRAM, 8, popper_state )
- AM_RANGE(0x0000, 0x5fff) AM_ROM
- AM_RANGE(0xc000, 0xc1bf) AM_RAM
- AM_RANGE(0xc1c0, 0xc1ff) AM_RAM_WRITE(popper_ol_videoram_w) AM_SHARE("ol_videoram")
- AM_RANGE(0xc200, 0xc61f) AM_RAM_WRITE(popper_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0xc620, 0xc9bf) AM_RAM
- AM_RANGE(0xc9c0, 0xc9ff) AM_RAM_WRITE(popper_ol_attribram_w) AM_SHARE("ol_attribram")
- AM_RANGE(0xca00, 0xce1f) AM_RAM_WRITE(popper_attribram_w) AM_SHARE("attribram")
- AM_RANGE(0xce20, 0xcfff) AM_RAM
- AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE("share1")
- AM_RANGE(0xe000, 0xe007) AM_READ(popper_input_ports_r)
- AM_RANGE(0xe000, 0xe000) AM_WRITE(nmi_mask_w)
- AM_RANGE(0xe001, 0xe001) AM_WRITE(popper_flipscreen_w)
- AM_RANGE(0xe002, 0xe002) AM_WRITE(popper_e002_w) //?? seems to be graphic related
- AM_RANGE(0xe003, 0xe003) AM_WRITE(popper_gfx_bank_w)
- AM_RANGE(0xe004, 0xe007) AM_WRITENOP //?? range cleared once when the SP is set
- AM_RANGE(0xe400, 0xe400) AM_READ(popper_soundcpu_nmi_r)
- AM_RANGE(0xf800, 0xf800) AM_READNOP //?? read once at startup
- AM_RANGE(0xfc00, 0xfc00) AM_READNOP //?? possibly watchdog
- AM_RANGE(0xffff, 0xffff) AM_READNOP
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( popper_sound_map, AS_PROGRAM, 8, popper_state )
- AM_RANGE(0x0000, 0x0fff) AM_ROM
- AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay1", ay8910_device, address_data_w)
- AM_RANGE(0x8002, 0x8002) AM_READNOP //?? all read once at startup and the
- AM_RANGE(0x8002, 0x8002) AM_WRITENOP //?? same writes as 0x8000 (mostly)
- AM_RANGE(0x8003, 0x8003) AM_READNOP //?? result ignored, looks like part
- AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("ay2", ay8910_device, address_data_w)
- AM_RANGE(0xa002, 0xa002) AM_READNOP //?? of AY8910 initialisation
- AM_RANGE(0xa002, 0xa002) AM_WRITENOP //?? same writes as 0xa000
- AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE("share1")
-ADDRESS_MAP_END
+public:
+ popper_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ { }
+};
-/*************************************
- *
- * Input ports
- *
- *************************************/
static INPUT_PORTS_START( popper )
- PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) //ignored if held for 12 or more frames
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE1 )
-
- PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
-
- PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) //ignored if held for 12 or more frames
-
- PORT_START("IN3")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
-
- PORT_START("DSW1") /* FAKE DSW1 */
- PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) //SW1:1-2
- PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) )
- PORT_DIPNAME( 0x0c, 0x08, DEF_STR( Coin_B ) ) //SW1:3-4
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
- PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x0c, DEF_STR( 1C_6C ) )
- PORT_DIPNAME( 0x30, 0x10, DEF_STR( Lives ) ) //SW1:5-6
- PORT_DIPSETTING( 0x00, "2" )
- PORT_DIPSETTING( 0x10, "3" )
- PORT_DIPSETTING( 0x20, "4" )
- PORT_DIPSETTING( 0x30, "5" )
- PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Bonus_Life ) ) //SW1:7-8
- PORT_DIPSETTING( 0x00, "20k, then every 70k" )
- PORT_DIPSETTING( 0x40, "30k, then every 70k" )
- PORT_DIPSETTING( 0x80, "40k, then every 70k" )
- PORT_DIPSETTING( 0xc0, "50k, then every 70k" )
-
- PORT_START("DSW2") /* FAKE DSW2 */
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) //SW2:1
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Allow_Continue ) ) //SW2:2 (stored in 0xd987, never read)
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x02, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x00, DEF_STR( Free_Play ) ) //SW2:3
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x00, "Pass (Unlimited Lives) (Cheat)") //SW2:4
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Flip_Screen ) ) //SW2:5
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Cabinet ) ) //SW2:6
- PORT_DIPSETTING( 0x20, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_DIPNAME( 0x40, 0x00, "Clear (Current Level) (Cheat)") //SW2:7
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x00, "Stop" ) //SW2:8
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
INPUT_PORTS_END
-/*************************************
- *
- * Graphics definitions
- *
- *************************************/
-
-static const gfx_layout popper_charlayout =
-{
- 8,8,
- RGN_FRAC(2,2),
- 2,
- { 0, 4 },
- { STEP4(8,1), STEP4(0,1) },
- { STEP8(0,16) },
- 16*8
-};
-
-static const gfx_layout popper_spritelayout =
-{
- 16,16,
- RGN_FRAC(1,2),
- 2,
- { 0, RGN_FRAC(1,2) },
- { STEP8(8,1), STEP8(0,1) },
- { STEP16(0, 16) },
- 16*2*8
-};
-
-static GFXDECODE_START( popper )
- GFXDECODE_ENTRY( "gfx1", 0, popper_charlayout, 0, 16 )
- GFXDECODE_ENTRY( "gfx2", 0, popper_spritelayout, 0, 16 )
-GFXDECODE_END
-
-/*************************************
- *
- * Machine driver
- *
- *************************************/
-
-void popper_state::machine_start()
-{
- save_item(NAME(m_flipscreen));
- save_item(NAME(m_e002));
- save_item(NAME(m_gfx_bank));
-}
-
-void popper_state::machine_reset()
-{
- m_flipscreen = 0;
- m_e002 = 0;
- m_gfx_bank = 0;
-}
-
-INTERRUPT_GEN_MEMBER(popper_state::vblank_irq)
-{
- if(m_nmi_mask)
- device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
-}
-
-
static MACHINE_CONFIG_START( popper, popper_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", Z80,18432000/6)
- MCFG_CPU_PROGRAM_MAP(popper_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", popper_state, vblank_irq)
-
- MCFG_CPU_ADD("audiocpu", Z80,18432000/12)
- MCFG_CPU_PROGRAM_MAP(popper_sound_map)
- MCFG_CPU_PERIODIC_INT_DRIVER(popper_state, irq0_line_hold, 4*60) //NMIs caused by the main CPU
-
- MCFG_QUANTUM_TIME(attotime::from_hz(1800))
-
-
- /* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(33*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 33*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(popper_state, screen_update_popper)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", popper)
- MCFG_PALETTE_ADD("palette", 64)
- MCFG_PALETTE_INIT_OWNER(popper_state, popper)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD("ay1", AY8910, 18432000/12)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-
- MCFG_SOUND_ADD("ay2", AY8910, 18432000/12)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
-
-/*************************************
- *
- * ROM definition
- *
- *************************************/
-
ROM_START( popper )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "p1", 0x0000, 0x2000, CRC(56881b70) SHA1(d3ade7a54a6cb8a0babf0d667a6b27f492a739dc) )
@@ -397,11 +68,4 @@ ROM_START( popper )
ROM_LOAD( "p.m4", 0x0020, 0x0020, CRC(384de5c1) SHA1(892c89a01c11671c5708113b4e4c27b84be37ea6) )
ROM_END
-
-/*************************************
- *
- * Game driver
- *
- *************************************/
-
-GAME( 1983, popper, 0, popper, popper, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Popper", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE )
+GAME( 1983, popper, 0, popper, popper, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Popper", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/qdrmfgp.cpp b/src/mame/drivers/qdrmfgp.cpp
index cfc4084b392..6e8a59867eb 100644
--- a/src/mame/drivers/qdrmfgp.cpp
+++ b/src/mame/drivers/qdrmfgp.cpp
@@ -1,5 +1,5 @@
-// license:???
-// copyright-holders:Eisuke Watanabe
+// license:BSD-3-Clause
+// copyright-holders:Hau
/***************************************************************************
Quiz Do Re Mi Fa Grand Prix (Japan) (GQ460) (c)1994 Konami
@@ -16,7 +16,7 @@ TODO:
command
--
-driver by Eisuke Watanabe
+driver by Hau
Note:
GP1 HDD data contents:
diff --git a/src/mame/drivers/sansa_fuze.cpp b/src/mame/drivers/sansa_fuze.cpp
index 2ee426af50c..ab8e8e22c07 100644
--- a/src/mame/drivers/sansa_fuze.cpp
+++ b/src/mame/drivers/sansa_fuze.cpp
@@ -1,3 +1,6 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
/* Sansa Fuze */
// info can be found at
diff --git a/src/mame/drivers/segapm.cpp b/src/mame/drivers/segapm.cpp
index 9ebc711ca4e..a35fe359acc 100644
--- a/src/mame/drivers/segapm.cpp
+++ b/src/mame/drivers/segapm.cpp
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
/* Sega Picture Magic (codename JANUS) */
// http://segaretro.org/Sega_Picture_Magic
diff --git a/src/mame/drivers/skylncr.cpp b/src/mame/drivers/skylncr.cpp
index 514df8d8100..cfaba6c0a36 100644
--- a/src/mame/drivers/skylncr.cpp
+++ b/src/mame/drivers/skylncr.cpp
@@ -543,6 +543,22 @@ static const gfx_layout layout8x8x8_alt = /* for sstar97 */
8*8*4
};
+static const gfx_layout layout8x8x8_bdream97 = /* for bdream97 */
+{
+ 8,8,
+ RGN_FRAC(1,2),
+ 8,
+ { STEP8(0,1) },
+ {
+ 8*0,RGN_FRAC(1,2)+8*0,
+ RGN_FRAC(1,2)+8*1,8*1,
+ 8*2,RGN_FRAC(1,2)+8*2,
+ RGN_FRAC(1,2)+8*3,8*3
+ },
+ { STEP8(0,8*4) },
+ 8*8*4
+};
+
static const gfx_layout layout8x32x8 =
{
8,32,
@@ -621,6 +637,25 @@ static const gfx_layout layout8x32x8_alt2 = /* for neraidov */
8*32*8/2
};
+static const gfx_layout layout8x32x8_bdream97 = /* for bdream97 */
+{
+ 8,32,
+ RGN_FRAC(1,2),
+ 8,
+ { STEP8(0,1) },
+ {
+ 8*1, RGN_FRAC(1,2)+8*1,
+ 8*0, RGN_FRAC(1,2)+8*0,
+ 8*3, RGN_FRAC(1,2)+8*3,
+ 8*2, RGN_FRAC(1,2)+8*2
+ },
+ {
+ STEP16(0,8*4),
+ STEP16(16*8*4,8*4)
+ },
+ 8*32*8/2
+};
+
/**************************************
* Graphics Decode *
@@ -644,6 +679,12 @@ static GFXDECODE_START( sstar97 )
GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8_alt, 0x100, 1 )
GFXDECODE_END
+static GFXDECODE_START( bdream97 )
+ GFXDECODE_ENTRY( "gfx1", 0, layout8x8x8_bdream97, 0, 2 )
+ GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8_bdream97, 0, 2 )
+ GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8_bdream97, 0x100, 1 )
+GFXDECODE_END
+
/***********************************
* Input Ports *
@@ -1431,6 +1472,14 @@ static MACHINE_CONFIG_DERIVED( sstar97, skylncr )
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( bdream97, skylncr )
+
+ /* basic machine hardware */
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_GFXDECODE_MODIFY("gfxdecode", bdream97)
+MACHINE_CONFIG_END
+
+
/**********************************
* ROM Load *
**********************************/
@@ -1650,6 +1699,26 @@ 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.
+*/
+ROM_START( bdream97 )
+ ROM_REGION( 0x80000, "maincpu", 0 )
+ ROM_LOAD( "27c512_subboard.bin", 0x0000, 0x10000, CRC(b0056324) SHA1(8299198d5e7ed50967f380ba0fddff5a39eee857) )
+
+ ROM_REGION( 0x80000, "gfx1", 0 ) // All ROMs are 27010.
+ ROM_LOAD16_BYTE( "27c010.u20", 0x00000, 0x20000, CRC(df1fd438) SHA1(8da4d116e768a3c269a2031db6bf38a5b7707029) )
+ ROM_LOAD16_BYTE( "27c010.u22", 0x00001, 0x20000, CRC(e66910eb) SHA1(454dc47caf4ae9408c3d0b759f4a32d346f86ffe) )
+ ROM_LOAD16_BYTE( "27c010.u21", 0x40000, 0x20000, CRC(b984f5bd) SHA1(9a21b46d6d497271cd589e01af3f3143946980b1) )
+ ROM_LOAD16_BYTE( "27c010.u23", 0x40001, 0x20000, CRC(2b6e6fd7) SHA1(cf0c66c90c6ab3ebc69ebe1e4f29b69b72edfdc2) )
+
+ ROM_REGION( 0x80000, "gfx2", 0 ) // All ROMs are 27010.
+ ROM_LOAD16_BYTE( "27c010.u24", 0x00000, 0x20000, CRC(b77f3fc5) SHA1(63f7b46ed19f256a6d84624e191dc1719a57cbed) )
+ ROM_LOAD16_BYTE( "27c010.u26", 0x00001, 0x20000, CRC(27cd64ef) SHA1(6b39b2919aca967f72fa16cd61b1641d0fb98d88) )
+ ROM_LOAD16_BYTE( "27c010.u25", 0x40000, 0x20000, CRC(bdebdf35) SHA1(245247b23ddeded32519608f4696205bb5541ccc) )
+ ROM_LOAD16_BYTE( "27c010.u27", 0x40001, 0x20000, CRC(0a266de4) SHA1(0ff9ad793e77d5419bd446cb73d4968e42305353) )
+ROM_END
+
/**********************************
* Driver Init *
@@ -1675,3 +1744,4 @@ GAME( 1995, leader, 0, skylncr, leader, skylncr_state, skylncr, ROT0
GAME( 199?, gallag50, 0, skylncr, gallag50, skylncr_state, skylncr, ROT0, "bootleg", "Gallag Video Game / Petalouda (Butterfly, x50)", 0 )
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 )
diff --git a/src/mame/drivers/sprcros2.cpp b/src/mame/drivers/sprcros2.cpp
index ac9b81efa33..ad7c67dccef 100644
--- a/src/mame/drivers/sprcros2.cpp
+++ b/src/mame/drivers/sprcros2.cpp
@@ -1,6 +1,15 @@
-// license:???
-// copyright-holders:insideoutboy
-/*
+// license:BSD-3-Clause
+// copyright-holders:Angelo Salese
+/***************************************************************************
+
+TODO:
+- complete rewrite;
+- scanline renderer;
+- understand irq 0 source;
+- output bit 0 might be watchdog armed bit/sprite start DMA instead of irq enable;
+
+===================================
+
Super Cross II (JPN Ver.)
(c)1986 GM Shoji
@@ -36,102 +45,214 @@ SCM-23.5B
SC-60.4K
SC-61.5A
-Notes:
+***************************************************************************/
-- sprites pop in at the wrong place sometimes before entering the screen
+#include "emu.h"
+#include "cpu/z80/z80.h"
+#include "sound/sn76496.h"
-- correct drawing/animation of bg is very sensitive to cpu speed/interrupts/
- interleave, current settings aren't correct but don't think there's any
- visible problems
+#define MAIN_CLOCK XTAL_10MHz
-- engine rev sound may not be completely correct
+class sprcros2_state : public driver_device
+{
+public:
+ sprcros2_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_master_cpu(*this, "master_cpu"),
+ m_slave_cpu(*this, "slave_cpu"),
+ m_gfxdecode(*this, "gfxdecode"),
+ m_fgvram(*this, "fgvram"),
+ m_fgattr(*this, "fgattr"),
+ m_bgvram(*this, "bgvram"),
+ m_bgattr(*this, "bgattr"),
+ m_sprram(*this, "sprram")
+ { }
+
+ // devices
+ required_device<cpu_device> m_master_cpu;
+ required_device<cpu_device> m_slave_cpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+
+ required_shared_ptr<UINT8> m_fgvram;
+ required_shared_ptr<UINT8> m_fgattr;
+ required_shared_ptr<UINT8> m_bgvram;
+ required_shared_ptr<UINT8> m_bgattr;
+ required_shared_ptr<UINT8> m_sprram;
+
+
+ // screen updates
+ UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ DECLARE_PALETTE_INIT(sprcros2);
+ DECLARE_WRITE8_MEMBER(master_output_w);
+ DECLARE_WRITE8_MEMBER(slave_output_w);
+ DECLARE_WRITE8_MEMBER(bg_scrollx_w);
+ DECLARE_WRITE8_MEMBER(bg_scrolly_w);
+ INTERRUPT_GEN_MEMBER(master_vblank_irq);
+ INTERRUPT_GEN_MEMBER(slave_vblank_irq);
+ TIMER_DEVICE_CALLBACK_MEMBER(master_scanline);
+
+ bool m_master_nmi_enable;
+ bool m_master_irq_enable;
+ bool m_slave_nmi_enable;
+ UINT8 m_bg_scrollx, m_bg_scrolly;
+protected:
+ // driver_device overrides
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ virtual void video_start() override;
+
+private:
+ void legacy_bg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect);
+ void legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect);
+ void legacy_obj_draw(bitmap_ind16 &bitmap,const rectangle &cliprect);
+};
-- bg not using second half of prom, of interest is this half is identical to
- the second half of a bankp/appoooh prom, hardware is similar to bankp/appoooh
- in a few ways, there's also an unused SEGA logo in the bg graphics
+void sprcros2_state::video_start()
+{
+}
-- fg not using odd colours, shouldn't matter as the colours are duplicated
+void sprcros2_state::legacy_bg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect)
+{
+ gfx_element *gfx_0 = m_gfxdecode->gfx(0);
+ int count = 0;
-- sprite priorities are wrong when bikes are jumping as they are ordered on
- vertical position only, assume this is original behaviour
-*/
+ for (int y=0;y<32;y++)
+ {
+ for (int x=0;x<32;x++)
+ {
+ UINT16 tile = m_bgvram[count];
+ tile |= (m_bgattr[count] & 7) << 8;
+ bool flipx = bool(m_bgattr[count] & 0x08);
+ UINT8 color = (m_bgattr[count] & 0xf0) >> 4;
+
+ gfx_0->opaque(bitmap,cliprect,tile,color,flipx,0,x*8-m_bg_scrollx,y*8-m_bg_scrolly);
+ gfx_0->opaque(bitmap,cliprect,tile,color,flipx,0,x*8+256-m_bg_scrollx,y*8-m_bg_scrolly);
+ gfx_0->opaque(bitmap,cliprect,tile,color,flipx,0,x*8-m_bg_scrollx,y*8+256-m_bg_scrolly);
+ gfx_0->opaque(bitmap,cliprect,tile,color,flipx,0,x*8+256-m_bg_scrollx,y*8+256-m_bg_scrolly);
+
+ count++;
+ }
+ }
+
+}
-#include "emu.h"
-#include "cpu/z80/z80.h"
-#include "sound/sn76496.h"
-#include "includes/sprcros2.h"
+void sprcros2_state::legacy_obj_draw(bitmap_ind16 &bitmap,const rectangle &cliprect)
+{
+ gfx_element *gfx_1 = m_gfxdecode->gfx(1);
+ for(int count=0x40-4;count>-1;count-=4)
+ {
+ UINT8 x,y,tile,color;
+ bool flipx;
+
+ y = 224-m_sprram[count+2];
+ x = m_sprram[count+3];
+ tile = m_sprram[count+0];
+ flipx = bool(m_sprram[count+1] & 2);
+ color = (m_sprram[count+1] & 0x38) >> 3;
+ gfx_1->transpen(bitmap,cliprect,tile,color,flipx,0,x,y & 0xff,0);
+ }
+}
+void sprcros2_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect)
+{
+ gfx_element *gfx_2 = m_gfxdecode->gfx(2);
+ int count = 0;
+
+ for (int y=0;y<32;y++)
+ {
+ for (int x=0;x<32;x++)
+ {
+ UINT16 tile = m_fgvram[count];
+ tile |= (m_fgattr[count] & 3) << 8;
+ UINT8 color = (m_fgattr[count] & 0xfc) >> 2;
+
+ gfx_2->transpen(bitmap,cliprect,tile,color,0,0,x*8,y*8,0);
+
+ count++;
+ }
+ }
+}
-WRITE8_MEMBER(sprcros2_state::m_port7_w)
-{
- //76543210
- //x------- unused
- //-x------ bankswitch halves of scm-01.10k into c000-dfff
- //--xx---- unused
- //----x--- irq enable
- //-----x-- ?? off with title flash and screen clears, possibly layer/sprite enable
- //------x- flip screen
- //-------x nmi enable
- if((m_port7^data)&0x40)
- membank("masterbank")->set_entry((data&0x40)>>6);
- machine().tilemap().set_flip_all(data&0x02?(TILEMAP_FLIPX|TILEMAP_FLIPY):0 );
+UINT32 sprcros2_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
+{
+ legacy_bg_draw(bitmap,cliprect);
+ legacy_obj_draw(bitmap,cliprect);
+ legacy_fg_draw(bitmap,cliprect);
+
+ return 0;
+}
- m_port7 = data;
+WRITE8_MEMBER(sprcros2_state::master_output_w)
+{
+ popmessage("%02x",data);
+ if(data & 0xbe)
+ printf("master 07 -> %02x\n",data);
+
+ membank("master_rombank")->set_entry((data&0x40)>>6);
+ m_master_nmi_enable = bool(data & 1);
+ m_master_irq_enable = bool(data & 8);
+// if(data & 0x80)
+// m_master_cpu->set_input_line(0,HOLD_LINE);
}
-WRITE8_MEMBER(sprcros2_state::s_port3_w)
+WRITE8_MEMBER(sprcros2_state::slave_output_w)
{
- //76543210
- //xxxx---- unused
- //----x--- bankswitch halves of scs-27.5k into c000-dfff
- //-----xx- unused
- //-------x nmi enable
+ if(data & 0xf6)
+ printf("slave 03 -> %02x\n",data);
+
+ m_slave_nmi_enable = bool(data & 1);
+ membank("slave_rombank")->set_entry((data&8)>>3);
+}
- if((m_s_port3^data)&0x08)
- membank("slavebank")->set_entry((data&0x08)>>3);
+WRITE8_MEMBER(sprcros2_state::bg_scrollx_w)
+{
+ m_bg_scrollx = data;
+}
- m_s_port3 = data;
+WRITE8_MEMBER(sprcros2_state::bg_scrolly_w)
+{
+ m_bg_scrolly = data;
}
-static ADDRESS_MAP_START( sprcros2_master_map, AS_PROGRAM, 8, sprcros2_state )
- AM_RANGE(0x0000, 0xbfff) AM_ROM
- AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("masterbank")
- AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(fgvideoram_w) AM_SHARE("fgvideoram")
- AM_RANGE(0xe800, 0xe817) AM_RAM //always zero
- AM_RANGE(0xe818, 0xe83f) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0xe840, 0xefff) AM_RAM //always zero
- AM_RANGE(0xf000, 0xf7ff) AM_RAM
- AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("share1") //shared with slave cpu
+static ADDRESS_MAP_START( master_map, AS_PROGRAM, 8, sprcros2_state )
+ AM_RANGE(0x0000, 0xbfff) AM_ROM AM_REGION("master", 0)
+ AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("master_rombank")
+ AM_RANGE(0xe000, 0xe3ff) AM_RAM AM_SHARE("fgvram")
+ AM_RANGE(0xe400, 0xe7ff) AM_RAM AM_SHARE("fgattr")
+ AM_RANGE(0xe800, 0xe83f) AM_RAM AM_SHARE("sprram")
+ AM_RANGE(0xe840, 0xf7ff) AM_RAM
+ AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("shared_ram")
ADDRESS_MAP_END
-static ADDRESS_MAP_START( sprcros2_master_io_map, AS_IO, 8, sprcros2_state )
+static ADDRESS_MAP_START( master_io, AS_IO, 8, sprcros2_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") AM_DEVWRITE("sn1", sn76489_device, write)
AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") AM_DEVWRITE("sn2", sn76489_device, write)
AM_RANGE(0x02, 0x02) AM_READ_PORT("EXTRA") AM_DEVWRITE("sn3", sn76489_device, write)
AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW1")
AM_RANGE(0x05, 0x05) AM_READ_PORT("DSW2")
- AM_RANGE(0x07, 0x07) AM_WRITE(m_port7_w)
+ AM_RANGE(0x07, 0x07) AM_WRITE(master_output_w)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( sprcros2_slave_map, AS_PROGRAM, 8, sprcros2_state )
- AM_RANGE(0x0000, 0xbfff) AM_ROM
- AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("slavebank")
- AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(bgvideoram_w) AM_SHARE("bgvideoram")
- AM_RANGE(0xe800, 0xefff) AM_RAM //always zero
- AM_RANGE(0xf000, 0xf7ff) AM_RAM
- AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("share1")
+static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 8, sprcros2_state )
+ AM_RANGE(0x0000, 0xbfff) AM_ROM AM_REGION("slave", 0)
+ AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("slave_rombank")
+ AM_RANGE(0xe000, 0xe3ff) AM_RAM AM_SHARE("bgvram")
+ AM_RANGE(0xe400, 0xe7ff) AM_RAM AM_SHARE("bgattr")
+ AM_RANGE(0xe800, 0xf7ff) AM_RAM
+ AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("shared_ram")
ADDRESS_MAP_END
-static ADDRESS_MAP_START( sprcros2_slave_io_map, AS_IO, 8, sprcros2_state )
+static ADDRESS_MAP_START( slave_io, AS_IO, 8, sprcros2_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_WRITE(bgscrollx_w)
- AM_RANGE(0x01, 0x01) AM_WRITE(bgscrolly_w)
- AM_RANGE(0x03, 0x03) AM_WRITE(s_port3_w)
+ AM_RANGE(0x00, 0x00) AM_WRITE(bg_scrollx_w)
+ AM_RANGE(0x01, 0x01) AM_WRITE(bg_scrolly_w)
+ AM_RANGE(0x03, 0x03) AM_WRITE(slave_output_w)
ADDRESS_MAP_END
static INPUT_PORTS_START( sprcros2 )
@@ -187,18 +308,7 @@ static INPUT_PORTS_START( sprcros2 )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
INPUT_PORTS_END
-static const gfx_layout sprcros2_bglayout =
-{
- 8,8,
- RGN_FRAC(1,3),
- 3,
- { RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3) },
- { STEP8(0,1) },
- { STEP8(0,8) },
- 8*8
-};
-
-static const gfx_layout sprcros2_spritelayout =
+static const gfx_layout sprite_layout =
{
32,32,
RGN_FRAC(1,3),
@@ -209,7 +319,7 @@ static const gfx_layout sprcros2_spritelayout =
32*32
};
-static const gfx_layout sprcros2_fglayout =
+static const gfx_layout fg_layout =
{
8,8,
RGN_FRAC(1,1),
@@ -221,73 +331,132 @@ static const gfx_layout sprcros2_fglayout =
};
static GFXDECODE_START( sprcros2 )
- GFXDECODE_ENTRY( "gfx1", 0, sprcros2_bglayout, 0, 16 )
- GFXDECODE_ENTRY( "gfx2", 0, sprcros2_spritelayout, 256, 6 )
- GFXDECODE_ENTRY( "gfx3", 0, sprcros2_fglayout, 512, 64 )
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x3_planar, 0, 16 )
+ GFXDECODE_ENTRY( "gfx2", 0, sprite_layout, 256, 32 )
+ GFXDECODE_ENTRY( "gfx3", 0, fg_layout, 512, 64 )
GFXDECODE_END
-TIMER_DEVICE_CALLBACK_MEMBER(sprcros2_state::m_interrupt)
+
+
+void sprcros2_state::machine_start()
{
- int scanline = param;
+ membank("master_rombank")->configure_entries(0, 2, memregion("master_bank")->base(), 0x2000);
+ membank("slave_rombank")->configure_entries(0, 2, memregion("slave_bank")->base(), 0x2000);
+
+}
+
+void sprcros2_state::machine_reset()
+{
+ m_master_nmi_enable = false;
+ m_slave_nmi_enable = false;
+}
- if (scanline == 240)
+
+PALETTE_INIT_MEMBER(sprcros2_state, sprcros2)
+{
+ const UINT8 *color_prom = memregion("proms")->base();
+ int i;
+
+ /* create a lookup table for the palette */
+ for (i = 0; i < 0x20; i++)
+ {
+ int bit0, bit1, bit2;
+ int r, g, b;
+
+ /* red component */
+ bit0 = (color_prom[i] >> 0) & 0x01;
+ bit1 = (color_prom[i] >> 1) & 0x01;
+ bit2 = (color_prom[i] >> 2) & 0x01;
+ r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+
+ /* green component */
+ bit0 = (color_prom[i] >> 3) & 0x01;
+ bit1 = (color_prom[i] >> 4) & 0x01;
+ bit2 = (color_prom[i] >> 5) & 0x01;
+ g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+
+ /* blue component */
+ bit0 = (color_prom[i] >> 6) & 0x01;
+ bit1 = (color_prom[i] >> 7) & 0x01;
+ b = 0x47 * bit0 + 0xb8 * bit1;
+ palette.set_pen_color(i,rgb_t(r,g,b));
+
+ palette.set_indirect_color(i, rgb_t(r, g, b));
+ }
+
+ /* color_prom now points to the beginning of the lookup table */
+ color_prom += 0x20;
+
+ /* bg */
+ for (i = 0; i < 0x100; i++)
{
- if(m_port7&0x01)
- m_master->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+ UINT8 ctabentry = (color_prom[i] & 0x0f) | ((color_prom[i + 0x100] & 0x0f) << 4);
+ palette.set_pen_indirect(i, ctabentry);
}
- else if(scanline == 0)
+
+ /* sprites & fg */
+ for (i = 0x100; i < 0x300; i++)
{
- if(m_port7&0x08)
- m_master->set_input_line(0, HOLD_LINE);
+ UINT8 ctabentry = color_prom[i + 0x100];
+ palette.set_pen_indirect(i, ctabentry);
}
}
-INTERRUPT_GEN_MEMBER(sprcros2_state::s_interrupt)
+INTERRUPT_GEN_MEMBER(sprcros2_state::master_vblank_irq)
{
- if(m_s_port3&0x01)
+ if(m_master_nmi_enable == true)
device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
-void sprcros2_state::machine_start()
+INTERRUPT_GEN_MEMBER(sprcros2_state::slave_vblank_irq)
+{
+ if(m_slave_nmi_enable == true)
+ device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
+}
+
+TIMER_DEVICE_CALLBACK_MEMBER(sprcros2_state::master_scanline)
{
- membank("masterbank")->configure_entries(0, 2, memregion("master")->base() + 0x10000, 0x2000);
- membank("slavebank")->configure_entries(0, 2, memregion("slave")->base() + 0x10000, 0x2000);
+ int scanline = param;
+
- save_item(NAME(m_port7));
- save_item(NAME(m_s_port3));
+ if(scanline == 0 && m_master_irq_enable == true)
+ m_master_cpu->set_input_line(0, HOLD_LINE);
}
static MACHINE_CONFIG_START( sprcros2, sprcros2_state )
/* basic machine hardware */
- MCFG_CPU_ADD("master", Z80,10000000/2)
- MCFG_CPU_PROGRAM_MAP(sprcros2_master_map)
- MCFG_CPU_IO_MAP(sprcros2_master_io_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sprcros2_state, m_interrupt, "screen", 0, 1)
-
- MCFG_CPU_ADD("slave", Z80,10000000/2)
- MCFG_CPU_PROGRAM_MAP(sprcros2_slave_map)
- MCFG_CPU_IO_MAP(sprcros2_slave_io_map)
- MCFG_CPU_PERIODIC_INT_DRIVER(sprcros2_state, s_interrupt, 2*60) //2 nmis
-
+ MCFG_CPU_ADD("master_cpu",Z80,MAIN_CLOCK/4)
+ MCFG_CPU_PROGRAM_MAP(master_map)
+ MCFG_CPU_IO_MAP(master_io)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", sprcros2_state, master_vblank_irq)
+ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sprcros2_state, master_scanline, "screen", 0, 1)
+
+ MCFG_CPU_ADD("slave_cpu",Z80,MAIN_CLOCK/4)
+ MCFG_CPU_PROGRAM_MAP(slave_map)
+ MCFG_CPU_IO_MAP(slave_io)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", sprcros2_state, slave_vblank_irq)
+
+ MCFG_QUANTUM_PERFECT_CPU("master_cpu")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_UPDATE_DRIVER(sprcros2_state, screen_update)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sprcros2_state, screen_update)
+// MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK/2, 343, 0, 256, 262, 0, 256) // TODO: Wrong screen parameters
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", sprcros2)
+
MCFG_PALETTE_ADD("palette", 768)
MCFG_PALETTE_INDIRECT_ENTRIES(32)
MCFG_PALETTE_INIT_OWNER(sprcros2_state, sprcros2)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
-
MCFG_SOUND_ADD("sn1", SN76489, 10000000/4)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
@@ -298,25 +467,36 @@ static MACHINE_CONFIG_START( sprcros2, sprcros2_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
+
+/***************************************************************************
+
+ Machine driver(s)
+
+***************************************************************************/
+
+
+
ROM_START( sprcros2 )
- ROM_REGION( 0x14000, "master", 0 )
+ ROM_REGION( 0x0c000, "master", 0 )
ROM_LOAD( "scm-03.10g", 0x00000, 0x4000, CRC(b9757908) SHA1(d59cb2aac1b6268fc766306850f5711d4a12d897) )
ROM_LOAD( "scm-02.10j", 0x04000, 0x4000, CRC(849c5c87) SHA1(0e02c4990e371d6a290efa53301818e769648945) )
ROM_LOAD( "scm-01.10k", 0x08000, 0x4000, CRC(385a62de) SHA1(847bf9d97ab3fa8949d9198e4e509948a940d6aa) )
+
+ ROM_REGION( 0x4000, "master_bank", 0)
+ ROM_LOAD( "scm-00.10l", 0x00000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) )
- ROM_LOAD( "scm-00.10l", 0x10000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) ) //banked into c000-dfff
-
- ROM_REGION( 0x14000, "slave", 0 )
+ ROM_REGION( 0xc000, "slave", 0 )
ROM_LOAD( "scs-30.5f", 0x00000, 0x4000, CRC(c0a40e41) SHA1(e74131b353855749258dffa45091c825ccdbf05a) )
ROM_LOAD( "scs-29.5h", 0x04000, 0x4000, CRC(83d49fa5) SHA1(7112110df2f382bbc0e651adcec975054a485b9b) )
ROM_LOAD( "scs-28.5j", 0x08000, 0x4000, CRC(480d351f) SHA1(d1b86f441ae0e58b30e0f089ab25de219d5f30e3) )
- ROM_LOAD( "scs-27.5k", 0x10000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) //banked into c000-dfff
+ ROM_REGION( 0x4000, "slave_bank", 0)
+ ROM_LOAD( "scs-27.5k", 0x00000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) )
ROM_REGION( 0xc000, "gfx1", 0 ) //bg
- ROM_LOAD( "scs-26.4b", 0x0000, 0x4000, CRC(f958b56d) SHA1(a1973179d336d2ba57294155550515f2b8a33a09) )
+ ROM_LOAD( "scs-26.4b", 0x8000, 0x4000, CRC(f958b56d) SHA1(a1973179d336d2ba57294155550515f2b8a33a09) )
ROM_LOAD( "scs-25.4c", 0x4000, 0x4000, CRC(d6fd7ba5) SHA1(1c26c4c1655b2be9cb6103e75386cc2f0cf27fc5) )
- ROM_LOAD( "scs-24.4e", 0x8000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) )
+ ROM_LOAD( "scs-24.4e", 0x0000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) )
ROM_REGION( 0xc000, "gfx2", 0 )
ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) //sprites
@@ -334,26 +514,27 @@ ROM_START( sprcros2 )
ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) //fg clut
ROM_END
-/* this is probably an old revision */
ROM_START( sprcros2a )
- ROM_REGION( 0x14000, "master", 0 )
+ ROM_REGION( 0xc000, "master", 0 )
ROM_LOAD( "15.bin", 0x00000, 0x4000, CRC(b9d02558) SHA1(775404c6c7648d9dab02b496541739ea700cd481) )
ROM_LOAD( "scm-02.10j", 0x04000, 0x4000, CRC(849c5c87) SHA1(0e02c4990e371d6a290efa53301818e769648945) )
ROM_LOAD( "scm-01.10k", 0x08000, 0x4000, CRC(385a62de) SHA1(847bf9d97ab3fa8949d9198e4e509948a940d6aa) )
- ROM_LOAD( "scm-00.10l", 0x10000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) ) //banked into c000-dfff
-
- ROM_REGION( 0x14000, "slave", 0 )
+ ROM_REGION( 0x4000, "master_bank", 0)
+ ROM_LOAD( "scm-00.10l", 0x00000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) )
+
+ ROM_REGION( 0xc000, "slave", 0 )
ROM_LOAD( "scs-30.5f", 0x00000, 0x4000, CRC(c0a40e41) SHA1(e74131b353855749258dffa45091c825ccdbf05a) )
ROM_LOAD( "scs-29.5h", 0x04000, 0x4000, CRC(83d49fa5) SHA1(7112110df2f382bbc0e651adcec975054a485b9b) )
ROM_LOAD( "scs-28.5j", 0x08000, 0x4000, CRC(480d351f) SHA1(d1b86f441ae0e58b30e0f089ab25de219d5f30e3) )
-
- ROM_LOAD( "scs-27.5k", 0x10000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) //banked into c000-dfff
+
+ ROM_REGION( 0x4000, "slave_bank", 0)
+ ROM_LOAD( "scs-27.5k", 0x00000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) //banked into c000-dfff
ROM_REGION( 0xc000, "gfx1", 0 ) //bg
- ROM_LOAD( "scs-26.4b", 0x0000, 0x4000, CRC(f958b56d) SHA1(a1973179d336d2ba57294155550515f2b8a33a09) )
+ ROM_LOAD( "scs-26.4b", 0x8000, 0x4000, CRC(f958b56d) SHA1(a1973179d336d2ba57294155550515f2b8a33a09) )
ROM_LOAD( "scs-25.4c", 0x4000, 0x4000, CRC(d6fd7ba5) SHA1(1c26c4c1655b2be9cb6103e75386cc2f0cf27fc5) )
- ROM_LOAD( "scs-24.4e", 0x8000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) )
+ ROM_LOAD( "scs-24.4e", 0x0000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) )
ROM_REGION( 0xc000, "gfx2", 0 )
ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) //sprites
@@ -371,5 +552,5 @@ ROM_START( sprcros2a )
ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) //fg clut
ROM_END
-GAME( 1986, sprcros2, 0, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, sprcros2a,sprcros2, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, sprcros2, 0, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+GAME( 1986, sprcros2a,sprcros2, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/supercon.cpp b/src/mame/drivers/supercon.cpp
index f40be537c43..cfdabc21650 100644
--- a/src/mame/drivers/supercon.cpp
+++ b/src/mame/drivers/supercon.cpp
@@ -1,9 +1,7 @@
-// license:???
-// copyright-holders:Ralf Schaefer, Robbbert
+// license:BSD-3-Clause
+// copyright-holders:Robbbert
/******************************************************************************
Novag SuperConstellation Chess Computer
- 2010 R. Schaefer
-
CPU 6502
Clock 4 MHz
@@ -30,756 +28,25 @@ public:
supercon_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_b_white(*this, "B_WHITE"),
- m_b_black(*this, "B_BLACK"),
- m_b_clr(*this, "B_CLR"),
- m_status_1(*this, "STATUS_1"),
- m_status_2(*this, "STATUS_2"),
- m_status_3(*this, "STATUS_3"),
- m_status_4(*this, "STATUS_4"),
- m_status_5(*this, "STATUS_5"),
- m_status_6(*this, "STATUS_6"),
- m_status_7(*this, "STATUS_7"),
- m_status_8(*this, "STATUS_8"),
- m_board_1(*this, "BOARD_1"),
- m_board_2(*this, "BOARD_2"),
- m_board_3(*this, "BOARD_3"),
- m_board_4(*this, "BOARD_4"),
- m_board_5(*this, "BOARD_5"),
- m_board_6(*this, "BOARD_6"),
- m_board_7(*this, "BOARD_7"),
- m_board_8(*this, "BOARD_8") { }
+ m_beep(*this, "beeper")
+ { }
required_device<cpu_device> m_maincpu;
required_device<beep_device> m_beep;
- DECLARE_READ8_MEMBER(supercon_port1_r);
- DECLARE_READ8_MEMBER(supercon_port2_r);
- DECLARE_READ8_MEMBER(supercon_port3_r);
- DECLARE_READ8_MEMBER(supercon_port4_r);
- DECLARE_WRITE8_MEMBER(supercon_port1_w);
- DECLARE_WRITE8_MEMBER(supercon_port2_w);
- DECLARE_WRITE8_MEMBER(supercon_port3_w);
- DECLARE_WRITE8_MEMBER(supercon_port4_w);
- static const UINT8 m_border_pieces[12];
- emu_timer* m_timer_update_irq;
- emu_timer* m_timer_mouse_click;
- int m_emu_started;
- int m_moving_piece;
- UINT8 m_data_1E00;
- UINT8 m_data_1F00;
- UINT8 m_LED_18;
- UINT8 m_LED_AH;
- UINT8 m_LED_ST;
- UINT8 *m_last_LED;
- UINT8 m_last_LED_value;
- int m_led_update;
- int m_remove_led_flag;
- int m_selecting;
- int m_save_key_data;
- attotime m_wait_time;
- int *m_current_field;
- int m_confirm_board_click;
- int m_board[64];
- int m_save_board[64];
- void set_board();
- void set_pieces();
- void set_border_pieces();
- void clear_pieces();
- void update_leds();
- virtual void machine_reset() override;
- DECLARE_DRIVER_INIT(supercon);
- virtual void machine_start() override;
- TIMER_CALLBACK_MEMBER(mouse_click);
- TIMER_CALLBACK_MEMBER(update_irq);
- TIMER_DEVICE_CALLBACK_MEMBER(update_artwork);
- void board_presave();
- void board_postload();
-
-protected:
- required_ioport m_b_white;
- required_ioport m_b_black;
- required_ioport m_b_clr;
- required_ioport m_status_1;
- required_ioport m_status_2;
- required_ioport m_status_3;
- required_ioport m_status_4;
- required_ioport m_status_5;
- required_ioport m_status_6;
- required_ioport m_status_7;
- required_ioport m_status_8;
- required_ioport m_board_1;
- required_ioport m_board_2;
- required_ioport m_board_3;
- required_ioport m_board_4;
- required_ioport m_board_5;
- required_ioport m_board_6;
- required_ioport m_board_7;
- required_ioport m_board_8;
- void mouse_update();
- int get_first_cleared_bit(UINT8 data);
- int get_first_bit(UINT8 data);
};
-
-#define VERBOSE 0
-#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
-
-enum
-{
- EM, /*No piece*/
- BP,
- BN,
- BB,
- BR,
- BQ,
- BK,
- WP,
- WN,
- WB,
- WR,
- WQ,
- WK
-};
-
-
-#define LED_LINE_AH 0x10
-#define LED_LINE_ST 0x20
-#define LED_LINE_18 0x40
-
-
#define MAIN_CLOCK 4000000 /* 4 MHz */
-
-#define NOT_VALID 99
-
-#define NO_ACTION 0
-#define TAKE 1
-#define SET 2
-
-/* artwork board */
-
-const UINT8 supercon_state::m_border_pieces[12] = {WK,WQ,WR,WB,WN,WP,BK,BQ,BR,BB,BN,BP};
-
-void supercon_state::set_board()
-{
- static const int start_board[64] = {
- BR, BN, BB, BQ, BK, BB, BN, BR,
- BP, BP, BP, BP, BP, BP, BP, BP,
- EM, EM, EM, EM, EM, EM, EM, EM,
- EM, EM, EM, EM, EM, EM, EM, EM,
- EM, EM, EM, EM, EM, EM, EM, EM,
- EM, EM, EM, EM, EM, EM, EM, EM,
- WP, WP, WP, WP, WP, WP, WP, WP,
- WR, WN, WB, WQ, WK, WB, WN, WR };
-
- for (UINT8 i=0; i<64; i++)
- m_board[i]=start_board[i];
-}
-
-void supercon_state::set_pieces()
-{
- int i;
- for (i=0;i<64;i++)
- output().set_indexed_value("P", i, m_board[i]);
-}
-
-void supercon_state::set_border_pieces()
-{
- UINT8 i;
-
- for (i=0;i<12;i++)
- output().set_indexed_value("Q", i, m_border_pieces[i]);
-}
-
-void supercon_state::clear_pieces()
-{
- int i;
- for (i=0;i<64;i++)
- {
- output().set_indexed_value("P", i, EM);
- m_board[i]=EM;
- }
-}
-
-int supercon_state::get_first_cleared_bit(UINT8 data)
-{
- int i;
-
- for (i = 0; i < 8; i++)
- if (!BIT(data, i))
- return i;
-
- return NOT_VALID;
-}
-
-int supercon_state::get_first_bit(UINT8 data)
-{
- int i;
-
- for (i = 0; i < 8; i++)
- if (BIT(data, i))
- return i;
-
- return NOT_VALID;
-}
-
-
-void supercon_state::update_leds()
-{
- int i;
-
- for (i = 0; i < 8; i++)
- {
- if (BIT(m_LED_18, i))
- output().set_led_value(i + 1, 1);
- else
- output().set_led_value(i + 1, 0);
-
- if (BIT(m_LED_AH, i))
- output().set_led_value(i + 9, 1);
- else
- output().set_led_value(i + 9, 0);
-
- if (BIT(m_LED_ST, i))
- output().set_led_value(i + 17, 1);
- else
- output().set_led_value(i + 17, 0);
- }
-}
-
-void supercon_state::mouse_update()
-{
- UINT8 port_input; // m_left;
- int i;
-
-/* border pieces and moving piece */
-
- port_input = m_b_white->read();
- if (port_input)
- {
- i = get_first_bit(port_input);
- m_moving_piece = m_border_pieces[i];
- output().set_value("MOVING", m_moving_piece);
- return;
- }
-
-
- port_input = m_b_black->read();
- if (port_input)
- {
- i = get_first_bit(port_input);
- m_moving_piece = m_border_pieces[6+i];
- output().set_value("MOVING", m_moving_piece);
- return;
- }
-
-
- port_input = m_b_clr->read();
- if (port_input)
- {
- if (m_moving_piece)
- {
- m_moving_piece=0;
- output().set_value("MOVING", m_moving_piece);
- return;
- }
- }
-}
-
-/* Driver initialization */
-
-DRIVER_INIT_MEMBER(supercon_state,supercon)
-{
- m_LED_18=0;
- m_LED_AH=0;
- m_LED_ST=0;
-
- m_wait_time = attotime::from_hz(4);
- m_save_key_data = 0xff;
-
- m_moving_piece=0;
-}
-
-/* Read 1C000 */
-
-READ8_MEMBER( supercon_state::supercon_port1_r )
-{
- LOG(("Read from %04x \n",0x1C00));
- return 0xff;
-}
-
-/* Read 1D000 */
-
-READ8_MEMBER( supercon_state::supercon_port2_r )
-{
- LOG(("Read from %04x \n",0x1D00));
- return 0xff;
-}
-
-/* Read 1E00 */
-
-READ8_MEMBER( supercon_state::supercon_port3_r )
-{
- int i;
- UINT8 key_data=0;
-
- static const char *const status_lines[8] =
- { "STATUS_1", "STATUS_2", "STATUS_3", "STATUS_4", "STATUS_5", "STATUS_6", "STATUS_7", "STATUS_8" };
-
- LOG(("Read from %04x \n",0x1E00));
-
-/* remove last bit (only if it was not already set) */
-
- if ( m_data_1F00 & LED_LINE_AH )
- {
- if (m_last_LED_value != m_LED_AH)
- m_LED_AH=m_LED_AH & ~m_data_1E00;
- }
- else if ( m_data_1F00 & LED_LINE_ST)
- {
- if (m_last_LED_value != m_LED_ST)
- m_LED_ST=m_LED_ST & ~m_data_1E00;
- }
- else if ( m_data_1F00 & LED_LINE_18 )
- {
- if (m_last_LED_value != m_LED_18)
- m_LED_18=m_LED_18 & ~m_data_1E00;
- }
-
-
- LOG(("LED_18 from %02x \n",m_LED_18));
- LOG(("LED_AH from %02x \n",m_LED_AH));
- LOG(("LED_ST from %02x \n",m_LED_ST));
-
- if (m_led_update) /*No LED Update if Port 1C00,1D00 was read */
- update_leds();
-
- m_remove_led_flag=TRUE;
- m_led_update=TRUE;
-
- m_LED_18=0;
- m_LED_AH=0;
- m_LED_ST=0;
-
-
-/* Start */
-
- if (!m_emu_started)
- return 0xbf;
- else
- m_timer_update_irq->adjust( attotime::zero, 0, attotime::from_hz(598) ); //HACK adjust timer after start ???
-
-
-/* Buttons */
-
- i=get_first_bit(m_data_1E00);
- if (i==NOT_VALID)
- return 0xff;
-
- switch ( i )
- {
- case 0: key_data=m_status_1->read(); break;
- case 1: key_data=m_status_2->read(); break;
- case 2: key_data=m_status_3->read(); break;
- case 3: key_data=m_status_4->read(); break;
- case 4: key_data=m_status_5->read(); break;
- case 5: key_data=m_status_6->read(); break;
- case 6: key_data=m_status_7->read(); break;
- case 7: key_data=m_status_8->read(); break;
- }
-
- if (key_data != 0xc0)
- {
- LOG(("%s, key_data: %02x \n",status_lines[i],key_data));
-
-/* Button: New Game -> initialize board */
-
- if (i==0 && key_data==0x80)
- {
- set_board();
- set_pieces();
-
- m_emu_started=FALSE;
- }
-
-/* Button: Clear Board -> remove all pieces */
-
- if (i==3 && key_data==0x80)
- clear_pieces();
-
- if (key_data != 0xff )
- return key_data;
- }
-
- return 0xc0;
-}
-
-/* Read Port $1F00 */
-
-READ8_MEMBER( supercon_state::supercon_port4_r )
-{
- int i_18, i_AH;
- UINT8 key_data = 0x00;
-
- static const char *const board_lines[8] =
- { "BOARD_1", "BOARD_2", "BOARD_3", "BOARD_4", "BOARD_5", "BOARD_6", "BOARD_7", "BOARD_8" };
-
- LOG(("Read from %04x \n",0x1F00));
-
-/* Board buttons */
-
- i_18=get_first_bit(m_data_1E00);
- if (i_18==NOT_VALID)
- return 0xff;
-
-/* if a button was pressed wait til timer -timer_mouse_click- is fired */
-
- if (m_selecting)
- return m_save_key_data;
- else
- {
- set_pieces();
- output().set_value("MOVING",m_moving_piece);
- }
-
- switch ( i_18 )
- {
- case 0: key_data=m_board_1->read(); break;
- case 1: key_data=m_board_2->read(); break;
- case 2: key_data=m_board_3->read(); break;
- case 3: key_data=m_board_4->read(); break;
- case 4: key_data=m_board_5->read(); break;
- case 5: key_data=m_board_6->read(); break;
- case 6: key_data=m_board_7->read(); break;
- case 7: key_data=m_board_8->read(); break;
- }
-
- if (key_data != 0xff)
- {
- LOG(("%s key_data: %02x \n",board_lines[i_18],key_data));
-
-/* Only if valid data */
-
- if (key_data)
- {
-/* Set or remove pieces */
-
- i_AH=7-get_first_cleared_bit(key_data);
- LOG(("Press -> AH: %d 18: %d Piece: %d\n",i_AH,i_18,m_board[i_18*8 + i_AH]););
-
- m_current_field=&m_board[i_18*8 + i_AH];
-
- if (m_moving_piece)
- {
- *m_current_field = m_moving_piece;
- m_moving_piece = EM;
- }
- else
- {
- m_moving_piece = *m_current_field;
- *m_current_field = EM;
- }
- m_selecting=TRUE; /* Flag is removed in timer -timer_mouse_click- */
- m_save_key_data=key_data; /* return same key_data til flag selecting is removed */
-
- m_timer_mouse_click->adjust(m_wait_time, 0);
-
- return key_data;
- }
- }
-
- return 0xff;
-}
-
-/* Write Port $1C00 */
-
-WRITE8_MEMBER( supercon_state::supercon_port1_w )
-{
- LOG(("Write from %04x data: %02x\n",0x1C00,data));
- m_led_update=FALSE;
-}
-
-/* Write Port $1D00 */
-
-WRITE8_MEMBER( supercon_state::supercon_port2_w )
-{
- LOG(("Write from %04x data: %02x\n",0x1D00,data));
- m_led_update=FALSE;
-}
-
-/* Write Port $1E00 */
-
-WRITE8_MEMBER( supercon_state::supercon_port3_w )
-{
- if (data)
- LOG(("Write from %04x data: %02x\n",0x1E00,data));
-
- if (data)
- {
- m_data_1E00=data;
-
-/* Set bits for LED's */
-
- if ( m_data_1F00)
- {
- if (m_data_1F00 & LED_LINE_AH )
- {
- m_last_LED = &m_LED_AH; /* save last value */
- m_last_LED_value = *m_last_LED;
-
- m_LED_AH=m_LED_AH | m_data_1E00;
- }
- else if (m_data_1F00 & LED_LINE_ST )
- {
- m_last_LED = &m_LED_ST;
- m_last_LED_value = *m_last_LED;
-
- m_LED_ST=m_LED_ST | m_data_1E00;
- }
- else if (m_data_1F00 & LED_LINE_18)
- {
- m_last_LED = &m_LED_18;
- m_last_LED_value = *m_last_LED;
-
- m_LED_18=m_LED_18 | m_data_1E00;
- }
- }
- }
-
- // The IRQ handler writes to both 0x1E00 (1x) and 0x1F00 (2x) ports.
- // Not 100% sure if this is the correct place for clearing the IRQ
- // line.
- m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
-}
-
-/* Write Port $1F00 */
-
-WRITE8_MEMBER( supercon_state::supercon_port4_w )
-{
- if (data)
- LOG(("Write from %04x data: %02x\n",0x1F00,data));
-
- if (data)
- m_data_1F00=data;
-
-/* Bit 7 is set -> Buzzer on */
-
- if ( m_data_1F00 & 0x80 )
- {
- m_beep->set_state(1);
- m_emu_started=TRUE;
- }
- else
- m_beep->set_state(0);
-}
-
-TIMER_CALLBACK_MEMBER(supercon_state::mouse_click)
-{
- m_selecting=FALSE;
-}
-
-TIMER_DEVICE_CALLBACK_MEMBER(supercon_state::update_artwork)
-{
- mouse_update();
-}
-
-TIMER_CALLBACK_MEMBER(supercon_state::update_irq)
-{
- m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
-}
-
-/* Save state call backs */
-
-void supercon_state::board_presave()
-{
- for (int i=0;i<64;i++)
- {
- m_save_board[i] = m_board[i];
- }
-}
-
-void supercon_state::board_postload()
-{
- for (int i=0;i<64;i++)
- {
- m_board[i] = m_save_board[i];
- }
-
- set_pieces();
-}
-
-void supercon_state::machine_start()
-{
- m_timer_update_irq = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(supercon_state::update_irq),this));
- m_timer_update_irq->adjust( attotime::zero, 0, attotime::from_hz(1000) );
- m_timer_mouse_click = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(supercon_state::mouse_click),this),nullptr);
- save_item(NAME(m_save_board));
- machine().save().register_postload(save_prepost_delegate(FUNC(supercon_state::board_postload),this));
- machine().save().register_presave(save_prepost_delegate(FUNC(supercon_state::board_presave),this));
-}
-
-void supercon_state::machine_reset()
-{
- set_board();
- set_pieces();
- set_border_pieces();
-
- m_emu_started=FALSE;
-}
-
/* Address maps */
static ADDRESS_MAP_START(supercon_mem, AS_PROGRAM, 8, supercon_state)
AM_RANGE( 0x0000, 0x0fff) AM_RAM
AM_RANGE( 0x2000, 0x7fff) AM_ROM
AM_RANGE( 0x8000, 0xffff) AM_ROM
-
- AM_RANGE( 0x1C00, 0x1C00) AM_WRITE ( supercon_port1_w )
- AM_RANGE( 0x1D00, 0x1D00) AM_WRITE ( supercon_port2_w )
- AM_RANGE( 0x1E00, 0x1E00) AM_WRITE ( supercon_port3_w )
- AM_RANGE( 0x1F00, 0x1F00) AM_WRITE ( supercon_port4_w )
-
- AM_RANGE( 0x1C00, 0x1C00) AM_READ ( supercon_port1_r )
- AM_RANGE( 0x1D00, 0x1D00) AM_READ ( supercon_port2_r )
- AM_RANGE( 0x1E00, 0x1E00) AM_READ ( supercon_port3_r )
- AM_RANGE( 0x1F00, 0x1F00) AM_READ ( supercon_port4_r )
ADDRESS_MAP_END
/* Input ports */
static INPUT_PORTS_START( supercon )
-
- PORT_START("BOARD_1")
- 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(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("BOARD_2")
- 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(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("BOARD_3")
- 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(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("BOARD_4")
- 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(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("BOARD_5")
- 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(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("BOARD_6")
- 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(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("BOARD_7")
- 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(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("BOARD_8")
- 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(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("STATUS_1")
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("STATUS_2")
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("STATUS_3")
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("STATUS_4")
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("STATUS_5")
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("STATUS_6")
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("STATUS_7")
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("STATUS_8")
- PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD)
- PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD)
-
- PORT_START("B_WHITE")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD)
-
- PORT_START("B_BLACK")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD)
-
- PORT_START("B_CLR")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD)
-
INPUT_PORTS_END
/* Machine driver */
@@ -793,8 +60,6 @@ static MACHINE_CONFIG_START( supercon, supercon_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("beeper", BEEP, 3250)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", supercon_state, update_artwork, attotime::from_hz(20))
MACHINE_CONFIG_END
/* ROM definition */
@@ -808,4 +73,4 @@ ROM_END
/* Driver */
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
-CONS( 1983, supercon, 0, 0, supercon, supercon, supercon_state, supercon, "Novag", "SuperConstellation", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
+CONS( 1983, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "SuperConstellation", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/suprnova.cpp b/src/mame/drivers/suprnova.cpp
index 95d08b082c5..d8919e56aa4 100644
--- a/src/mame/drivers/suprnova.cpp
+++ b/src/mame/drivers/suprnova.cpp
@@ -226,7 +226,7 @@ void skns_state::hit_recalc()
*/
}
-WRITE32_MEMBER(skns_state::skns_hit_w)
+WRITE32_MEMBER(skns_state::hit_w)
//void hit_w(UINT32 adr, UINT32 data, int type)
{
hit_t &hit = m_hit;
@@ -291,7 +291,7 @@ WRITE32_MEMBER(skns_state::skns_hit_w)
hit_recalc();
}
-WRITE32_MEMBER(skns_state::skns_hit2_w)
+WRITE32_MEMBER(skns_state::hit2_w)
{
hit_t &hit = m_hit;
@@ -324,7 +324,7 @@ WRITE32_MEMBER(skns_state::skns_hit2_w)
}
-READ32_MEMBER(skns_state::skns_hit_r)
+READ32_MEMBER(skns_state::hit_r)
//UINT32 hit_r(UINT32 adr, int type)
{
hit_t &hit = m_hit;
@@ -422,6 +422,46 @@ TIMER_DEVICE_CALLBACK_MEMBER(skns_state::interrupt_callback)
m_maincpu->set_input_line(param, HOLD_LINE);
}
+void skns_state::machine_start()
+{
+ m_btiles = memregion("gfx3")->base();
+
+ save_pointer(NAME(m_btiles), memregion("gfx3")->bytes());
+ save_item(NAME(m_hit.x1p));
+ save_item(NAME(m_hit.y1p));
+ save_item(NAME(m_hit.z1p));
+ save_item(NAME(m_hit.x1s));
+ save_item(NAME(m_hit.y1s));
+ save_item(NAME(m_hit.z1s));
+ save_item(NAME(m_hit.x2p));
+ save_item(NAME(m_hit.y2p));
+ save_item(NAME(m_hit.z2p));
+ save_item(NAME(m_hit.x2s));
+ save_item(NAME(m_hit.y2s));
+ save_item(NAME(m_hit.z2s));
+ save_item(NAME(m_hit.org));
+ save_item(NAME(m_hit.x1_p1));
+ save_item(NAME(m_hit.x1_p2));
+ save_item(NAME(m_hit.y1_p1));
+ save_item(NAME(m_hit.y1_p2));
+ save_item(NAME(m_hit.z1_p1));
+ save_item(NAME(m_hit.z1_p2));
+ save_item(NAME(m_hit.x2_p1));
+ save_item(NAME(m_hit.x2_p2));
+ save_item(NAME(m_hit.y2_p1));
+ save_item(NAME(m_hit.y2_p2));
+ save_item(NAME(m_hit.z2_p1));
+ save_item(NAME(m_hit.z2_p2));
+ save_item(NAME(m_hit.x1tox2));
+ save_item(NAME(m_hit.y1toy2));
+ save_item(NAME(m_hit.z1toz2));
+ save_item(NAME(m_hit.x_in));
+ save_item(NAME(m_hit.y_in));
+ save_item(NAME(m_hit.z_in));
+ save_item(NAME(m_hit.flag));
+ save_item(NAME(m_hit.disconnect));
+}
+
void skns_state::machine_reset()
{
hit_t &hit = m_hit;
@@ -435,7 +475,7 @@ void skns_state::machine_reset()
}
-TIMER_DEVICE_CALLBACK_MEMBER(skns_state::skns_irq)
+TIMER_DEVICE_CALLBACK_MEMBER(skns_state::irq)
{
int scanline = param;
@@ -599,7 +639,7 @@ INPUT_PORTS_END
-WRITE32_MEMBER(skns_state::skns_io_w)
+WRITE32_MEMBER(skns_state::io_w)
{
switch(offset) {
case 2:
@@ -662,10 +702,8 @@ WRITE32_MEMBER(skns_state::skns_io_w)
/* end old driver code */
-WRITE32_MEMBER(skns_state::skns_v3t_w)
+WRITE32_MEMBER(skns_state::v3t_w)
{
- UINT8 *btiles = memregion("gfx3")->base();
-
COMBINE_DATA(&m_v3t_ram[offset]);
m_gfxdecode->gfx(1)->mark_dirty(offset/0x40);
@@ -673,15 +711,16 @@ WRITE32_MEMBER(skns_state::skns_v3t_w)
data = m_v3t_ram[offset];
// i think we need to swap around to decode .. endian issues?
- btiles[offset*4+0] = (data & 0xff000000) >> 24;
- btiles[offset*4+1] = (data & 0x00ff0000) >> 16;
- btiles[offset*4+2] = (data & 0x0000ff00) >> 8;
- btiles[offset*4+3] = (data & 0x000000ff) >> 0;
+
+ m_btiles[offset*4+0] = (data & 0xff000000) >> 24;
+ m_btiles[offset*4+1] = (data & 0x00ff0000) >> 16;
+ m_btiles[offset*4+2] = (data & 0x0000ff00) >> 8;
+ m_btiles[offset*4+3] = (data & 0x000000ff) >> 0;
}
static ADDRESS_MAP_START( skns_map, AS_PROGRAM, 32, skns_state )
AM_RANGE(0x00000000, 0x0007ffff) AM_ROM /* BIOS ROM */
- AM_RANGE(0x00400000, 0x0040000f) AM_WRITE(skns_io_w) /* I/O Write */
+ AM_RANGE(0x00400000, 0x0040000f) AM_WRITE(io_w) /* I/O Write */
AM_RANGE(0x00400000, 0x00400003) AM_READ_PORT("400000")
AM_RANGE(0x00400004, 0x00400007) AM_READ_PORT("400004")
/* In between is write only */
@@ -689,18 +728,18 @@ static ADDRESS_MAP_START( skns_map, AS_PROGRAM, 32, skns_state )
AM_RANGE(0x00800000, 0x00801fff) AM_RAM AM_SHARE("nvram") /* 'backup' RAM */
AM_RANGE(0x00c00000, 0x00c00003) AM_DEVREADWRITE8("ymz", ymz280b_device, read, write, 0xffff0000) /* ymz280_w (sound) */
AM_RANGE(0x01000000, 0x0100000f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write, 0xffffffff)
- AM_RANGE(0x01800000, 0x01800003) AM_WRITE(skns_hit2_w)
+ AM_RANGE(0x01800000, 0x01800003) AM_WRITE(hit2_w)
AM_RANGE(0x02000000, 0x02003fff) AM_RAM AM_SHARE("spriteram") /* sprite ram */
AM_RANGE(0x02100000, 0x0210003f) AM_RAM AM_SHARE("spc_regs") /* sprite registers */
- AM_RANGE(0x02400000, 0x0240007f) AM_RAM_WRITE(skns_v3_regs_w) AM_SHARE("v3_regs") /* tilemap registers */
- AM_RANGE(0x02500000, 0x02503fff) AM_RAM_WRITE(skns_tilemapA_w) AM_SHARE("tilemapa_ram") /* tilemap A */
- AM_RANGE(0x02504000, 0x02507fff) AM_RAM_WRITE(skns_tilemapB_w) AM_SHARE("tilemapb_ram") /* tilemap B */
+ AM_RANGE(0x02400000, 0x0240007f) AM_RAM_WRITE(v3_regs_w) AM_SHARE("v3_regs") /* tilemap registers */
+ AM_RANGE(0x02500000, 0x02503fff) AM_RAM_WRITE(tilemapA_w) AM_SHARE("tilemapa_ram") /* tilemap A */
+ AM_RANGE(0x02504000, 0x02507fff) AM_RAM_WRITE(tilemapB_w) AM_SHARE("tilemapb_ram") /* tilemap B */
AM_RANGE(0x02600000, 0x02607fff) AM_RAM AM_SHARE("v3slc_ram") /* tilemap linescroll */
- AM_RANGE(0x02a00000, 0x02a0001f) AM_RAM_WRITE(skns_pal_regs_w) AM_SHARE("pal_regs")
- AM_RANGE(0x02a40000, 0x02a5ffff) AM_RAM_WRITE(skns_palette_ram_w) AM_SHARE("palette_ram")
- AM_RANGE(0x02f00000, 0x02f000ff) AM_READWRITE(skns_hit_r, skns_hit_w)
+ AM_RANGE(0x02a00000, 0x02a0001f) AM_RAM_WRITE(pal_regs_w) AM_SHARE("pal_regs")
+ AM_RANGE(0x02a40000, 0x02a5ffff) AM_RAM_WRITE(palette_ram_w) AM_SHARE("palette_ram")
+ AM_RANGE(0x02f00000, 0x02f000ff) AM_READWRITE(hit_r, hit_w)
AM_RANGE(0x04000000, 0x041fffff) AM_ROMBANK("bank1") /* GAME ROM */
- AM_RANGE(0x04800000, 0x0483ffff) AM_RAM_WRITE(skns_v3t_w) AM_SHARE("v3t_ram") /* tilemap b ram based tiles */
+ AM_RANGE(0x04800000, 0x0483ffff) AM_RAM_WRITE(v3t_w) AM_SHARE("v3t_ram") /* tilemap b ram based tiles */
AM_RANGE(0x06000000, 0x060fffff) AM_RAM AM_SHARE("main_ram")
AM_RANGE(0xc0000000, 0xc0000fff) AM_RAM AM_SHARE("cache_ram") /* 'cache' RAM */
ADDRESS_MAP_END
@@ -746,7 +785,7 @@ GFXDECODE_END
static MACHINE_CONFIG_START( skns, skns_state )
MCFG_CPU_ADD("maincpu", SH2,28638000)
MCFG_CPU_PROGRAM_MAP(skns_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", skns_state, skns_irq, "screen", 0, 1)
+ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", skns_state, irq, "screen", 0, 1)
MCFG_DEVICE_ADD("rtc", MSM6242, XTAL_32_768kHz)
@@ -765,8 +804,7 @@ static MACHINE_CONFIG_START( skns, skns_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(340,262)
MCFG_SCREEN_VISIBLE_AREA(0,319,0,239)
- MCFG_SCREEN_UPDATE_DRIVER(skns_state, screen_update_skns)
- MCFG_SCREEN_VBLANK_DRIVER(skns_state, screen_eof_skns)
+ MCFG_SCREEN_UPDATE_DRIVER(skns_state, screen_update)
MCFG_PALETTE_ADD("palette", 32768)
MCFG_GFXDECODE_ADD("gfxdecode", "palette", skns_bg)
@@ -944,7 +982,7 @@ READ32_MEMBER(skns_state::sengekij_speedup_r)// 60006ee 600308e
return m_main_ram[0xb7380/4];
}
-void skns_state::init_skns()
+void skns_state::init_drc()
{
// init DRC to fastest options
m_maincpu->sh2drc_set_options(SH2DRC_FASTEST_OPTIONS);
@@ -958,25 +996,25 @@ void skns_state::set_drc_pcflush(UINT32 addr)
m_maincpu->sh2drc_add_pcflush(addr);
}
-DRIVER_INIT_MEMBER(skns_state,galpani4) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-5,-1); init_skns(); }
-DRIVER_INIT_MEMBER(skns_state,galpanis) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-5,-1); init_skns(); }
-DRIVER_INIT_MEMBER(skns_state,cyvern) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+0,+2); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x604d3c8, 0x604d3cb, read32_delegate(FUNC(skns_state::cyvern_speedup_r),this) ); set_drc_pcflush(0x402ebd2); }
-DRIVER_INIT_MEMBER(skns_state,galpans2) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-1,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60fb6bc, 0x60fb6bf, read32_delegate(FUNC(skns_state::galpans2_speedup_r),this) ); set_drc_pcflush(0x4049ae2); }
-DRIVER_INIT_MEMBER(skns_state,gutsn) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+0,+0); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x600c780, 0x600c783, read32_delegate(FUNC(skns_state::gutsn_speedup_r),this) ); set_drc_pcflush(0x402206e); }
-DRIVER_INIT_MEMBER(skns_state,panicstr) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-1,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60f19e4, 0x60f19e7, read32_delegate(FUNC(skns_state::panicstr_speedup_r),this) ); set_drc_pcflush(0x404e68a); }
-DRIVER_INIT_MEMBER(skns_state,senknow) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+1,+1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60000dc, 0x60000df, read32_delegate(FUNC(skns_state::senknow_speedup_r),this) ); set_drc_pcflush(0x4017dce); }
-DRIVER_INIT_MEMBER(skns_state,puzzloope) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-9,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6081d38, 0x6081d3b, read32_delegate(FUNC(skns_state::puzzloope_speedup_r),this) ); set_drc_pcflush(0x401da14); }
-DRIVER_INIT_MEMBER(skns_state,puzzloopj) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-9,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6086714, 0x6086717, read32_delegate(FUNC(skns_state::puzzloopj_speedup_r),this) ); set_drc_pcflush(0x401dca0); }
-DRIVER_INIT_MEMBER(skns_state,puzzloopa) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-9,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6085bcc, 0x6085bcf, read32_delegate(FUNC(skns_state::puzzloopa_speedup_r),this) ); set_drc_pcflush(0x401d9d4); }
-DRIVER_INIT_MEMBER(skns_state,puzzloopu) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-9,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6085cec, 0x6085cef, read32_delegate(FUNC(skns_state::puzzloopu_speedup_r),this) ); set_drc_pcflush(0x401dab0); }
-DRIVER_INIT_MEMBER(skns_state,jjparads) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+5,+1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000994, 0x6000997, read32_delegate(FUNC(skns_state::jjparads_speedup_r),this) ); set_drc_pcflush(0x4015e84); }
-DRIVER_INIT_MEMBER(skns_state,jjparad2) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+5,+1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000984, 0x6000987, read32_delegate(FUNC(skns_state::jjparad2_speedup_r),this) ); set_drc_pcflush(0x401620a); }
-DRIVER_INIT_MEMBER(skns_state,ryouran) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+5,+1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000a14, 0x6000a17, read32_delegate(FUNC(skns_state::ryouran_speedup_r),this) ); set_drc_pcflush(0x40182ce); }
-DRIVER_INIT_MEMBER(skns_state,teljan) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+5,+1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6002fb4, 0x6002fb7, read32_delegate(FUNC(skns_state::teljan_speedup_r),this) ); set_drc_pcflush(0x401ba32); }
-DRIVER_INIT_MEMBER(skns_state,sengekis) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-192,-272); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60b74bc, 0x60b74bf, read32_delegate(FUNC(skns_state::sengekis_speedup_r),this) ); set_drc_pcflush(0x60006ec); }
-DRIVER_INIT_MEMBER(skns_state,sengekij) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-192,-272); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60b7380, 0x60b7383, read32_delegate(FUNC(skns_state::sengekij_speedup_r),this) ); set_drc_pcflush(0x60006ec); }
-DRIVER_INIT_MEMBER(skns_state,sarukani) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-1,-1); init_skns(); set_drc_pcflush(0x4013b42); } // Speedup is in skns_io_w()
-DRIVER_INIT_MEMBER(skns_state,galpans3) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-1,-1); init_skns(); }
+DRIVER_INIT_MEMBER(skns_state,galpani4) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-5,-1); init_drc(); }
+DRIVER_INIT_MEMBER(skns_state,galpanis) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-5,-1); init_drc(); }
+DRIVER_INIT_MEMBER(skns_state,cyvern) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+0,+2); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x604d3c8, 0x604d3cb, read32_delegate(FUNC(skns_state::cyvern_speedup_r),this) ); set_drc_pcflush(0x402ebd2); }
+DRIVER_INIT_MEMBER(skns_state,galpans2) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-1,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60fb6bc, 0x60fb6bf, read32_delegate(FUNC(skns_state::galpans2_speedup_r),this) ); set_drc_pcflush(0x4049ae2); }
+DRIVER_INIT_MEMBER(skns_state,gutsn) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+0,+0); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x600c780, 0x600c783, read32_delegate(FUNC(skns_state::gutsn_speedup_r),this) ); set_drc_pcflush(0x402206e); }
+DRIVER_INIT_MEMBER(skns_state,panicstr) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-1,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60f19e4, 0x60f19e7, read32_delegate(FUNC(skns_state::panicstr_speedup_r),this) ); set_drc_pcflush(0x404e68a); }
+DRIVER_INIT_MEMBER(skns_state,senknow) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+1,+1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60000dc, 0x60000df, read32_delegate(FUNC(skns_state::senknow_speedup_r),this) ); set_drc_pcflush(0x4017dce); }
+DRIVER_INIT_MEMBER(skns_state,puzzloope) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-9,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6081d38, 0x6081d3b, read32_delegate(FUNC(skns_state::puzzloope_speedup_r),this) ); set_drc_pcflush(0x401da14); }
+DRIVER_INIT_MEMBER(skns_state,puzzloopj) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-9,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6086714, 0x6086717, read32_delegate(FUNC(skns_state::puzzloopj_speedup_r),this) ); set_drc_pcflush(0x401dca0); }
+DRIVER_INIT_MEMBER(skns_state,puzzloopa) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-9,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6085bcc, 0x6085bcf, read32_delegate(FUNC(skns_state::puzzloopa_speedup_r),this) ); set_drc_pcflush(0x401d9d4); }
+DRIVER_INIT_MEMBER(skns_state,puzzloopu) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-9,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6085cec, 0x6085cef, read32_delegate(FUNC(skns_state::puzzloopu_speedup_r),this) ); set_drc_pcflush(0x401dab0); }
+DRIVER_INIT_MEMBER(skns_state,jjparads) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+5,+1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000994, 0x6000997, read32_delegate(FUNC(skns_state::jjparads_speedup_r),this) ); set_drc_pcflush(0x4015e84); }
+DRIVER_INIT_MEMBER(skns_state,jjparad2) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+5,+1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000984, 0x6000987, read32_delegate(FUNC(skns_state::jjparad2_speedup_r),this) ); set_drc_pcflush(0x401620a); }
+DRIVER_INIT_MEMBER(skns_state,ryouran) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+5,+1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000a14, 0x6000a17, read32_delegate(FUNC(skns_state::ryouran_speedup_r),this) ); set_drc_pcflush(0x40182ce); }
+DRIVER_INIT_MEMBER(skns_state,teljan) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(+5,+1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6002fb4, 0x6002fb7, read32_delegate(FUNC(skns_state::teljan_speedup_r),this) ); set_drc_pcflush(0x401ba32); }
+DRIVER_INIT_MEMBER(skns_state,sengekis) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-192,-272); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60b74bc, 0x60b74bf, read32_delegate(FUNC(skns_state::sengekis_speedup_r),this) ); set_drc_pcflush(0x60006ec); }
+DRIVER_INIT_MEMBER(skns_state,sengekij) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-192,-272); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60b7380, 0x60b7383, read32_delegate(FUNC(skns_state::sengekij_speedup_r),this) ); set_drc_pcflush(0x60006ec); }
+DRIVER_INIT_MEMBER(skns_state,sarukani) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-1,-1); init_drc(); set_drc_pcflush(0x4013b42); } // Speedup is in io_w()
+DRIVER_INIT_MEMBER(skns_state,galpans3) { machine().device<sknsspr_device>("spritegen")->skns_sprite_kludge(-1,-1); init_drc(); }
diff --git a/src/mame/drivers/svi318.cpp b/src/mame/drivers/svi318.cpp
index a5761935c45..4a6396cb80a 100644
--- a/src/mame/drivers/svi318.cpp
+++ b/src/mame/drivers/svi318.cpp
@@ -1,10 +1,8 @@
-// license:???
-// copyright-holders:Sean Young,Tomas Karlsson
+// license:BSD-3-Clause
+// copyright-holders:Sean Young
/*
** svi318.c : driver for Spectravideo SVI-318 and SVI-328
**
-** Sean Young, Tomas Karlsson
-**
** Information taken from: http://www.samdal.com/sv318.htm
**
** SV-318 : 16KB Video RAM, 16KB RAM
@@ -12,53 +10,134 @@
*/
#include "emu.h"
-#include "includes/svi318.h"
+#include "cpu/z80/z80.h"
+#include "machine/i8255.h"
+#include "machine/ins8250.h"
+#include "machine/wd_fdc.h"
+#include "machine/ram.h"
+#include "machine/buffer.h"
+#include "imagedev/cassette.h"
+#include "sound/dac.h"
+#include "sound/ay8910.h"
+#include "sound/wave.h"
+#include "video/mc6845.h"
+#include "video/tms9928a.h"
+#include "bus/centronics/ctronics.h"
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
#include "imagedev/flopdrv.h"
#include "formats/svi_dsk.h"
#include "formats/svi_cas.h"
#include "softlist.h"
#include "rendlay.h"
+
+class svi318_state : public driver_device
+{
+public:
+ svi318_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_cassette(*this, "cassette"),
+ m_dac(*this, "dac"),
+ m_ppi(*this, "ppi8255"),
+ m_ram(*this, RAM_TAG),
+ m_centronics(*this, "centronics"),
+ m_cent_data_out(*this, "cent_data_out"),
+ m_ins8250_0(*this, "ins8250_0"),
+ m_ins8250_1(*this, "ins8250_1"),
+ m_cart(*this, "cartslot"),
+ m_fd1793(*this, "wd179x"),
+ m_floppy0(*this, "wd179x:0"),
+ m_floppy1(*this, "wd179x:1"),
+// m_crtc(*this, "crtc"),
+ m_line(*this, "LINE"),
+ m_joysticks(*this, "JOYSTICKS"),
+ m_buttons(*this, "BUTTONS"),
+ m_palette(*this, "palette"),
+ m_bank1(*this, "bank1"),
+ m_bank2(*this, "bank2"),
+ m_bank3(*this, "bank3"),
+ m_bank4(*this, "bank4")
+ { }
+
+ DECLARE_FLOPPY_FORMATS(floppy_formats);
+
+ DECLARE_WRITE_LINE_MEMBER(vdp_interrupt);
+ // FDC
+ int m_drq;
+ int m_irq;
+
+ memory_region *m_cart_rom;
+ memory_region *m_bios_rom;
+
+protected:
+ required_device<z80_device> m_maincpu;
+ required_device<cassette_image_device> m_cassette;
+ required_device<dac_device> m_dac;
+ required_device<i8255_device> m_ppi;
+ required_device<ram_device> m_ram;
+ required_device<centronics_device> m_centronics;
+ required_device<output_latch_device> m_cent_data_out;
+ required_device<ins8250_device> m_ins8250_0;
+ required_device<ins8250_device> m_ins8250_1;
+ required_device<generic_slot_device> m_cart;
+ required_device<fd1793_t> m_fd1793;
+ required_device<floppy_connector> m_floppy0;
+ required_device<floppy_connector> m_floppy1;
+ //optional_device<mc6845_device> m_crtc;
+ required_ioport_array<11> m_line;
+ required_ioport m_joysticks;
+ required_ioport m_buttons;
+ optional_device<palette_device> m_palette;
+
+private:
+ required_memory_bank m_bank1;
+ required_memory_bank m_bank2;
+ required_memory_bank m_bank3;
+ optional_memory_bank m_bank4;
+};
+
static ADDRESS_MAP_START( svi318_mem, AS_PROGRAM, 8, svi318_state )
- AM_RANGE(0x0000, 0x7fff) AM_READ_BANK("bank1") AM_WRITE(writemem1)
- AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank2") AM_WRITE(writemem2)
- AM_RANGE(0xc000, 0xffff) AM_READ_BANK("bank3") AM_WRITE(writemem3)
+ //AM_RANGE(0x0000, 0x7fff) AM_READ_BANK("bank1") AM_WRITE(writemem1)
+ //AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank2") AM_WRITE(writemem2)
+ //AM_RANGE(0xc000, 0xffff) AM_READ_BANK("bank3") AM_WRITE(writemem3)
ADDRESS_MAP_END
static ADDRESS_MAP_START( svi328_806_mem, AS_PROGRAM, 8, svi318_state )
- AM_RANGE(0x0000, 0x7fff) AM_READ_BANK("bank1") AM_WRITE(writemem1)
- AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank2") AM_WRITE(writemem2)
- AM_RANGE(0xc000, 0xefff) AM_READ_BANK("bank3") AM_WRITE(writemem3)
- AM_RANGE(0xf000, 0xffff) AM_READ_BANK("bank4") AM_WRITE(writemem4)
+ //AM_RANGE(0x0000, 0x7fff) AM_READ_BANK("bank1") AM_WRITE(writemem1)
+ //AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank2") AM_WRITE(writemem2)
+ //AM_RANGE(0xc000, 0xefff) AM_READ_BANK("bank3") AM_WRITE(writemem3)
+ //AM_RANGE(0xf000, 0xffff) AM_READ_BANK("bank4") AM_WRITE(writemem4)
ADDRESS_MAP_END
static ADDRESS_MAP_START( svi318_io, AS_IO, 8, svi318_state )
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x38) AM_READWRITE(io_ext_r, io_ext_w )
- AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write)
- AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write)
- AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read)
- AM_RANGE(0x85, 0x85) AM_DEVREAD("tms9928a", tms9928a_device, register_read)
+ //AM_RANGE(0x00, 0x38) AM_READWRITE(io_ext_r, io_ext_w )
+ //AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write)
+ //AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write)
+ //AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read)
+ //AM_RANGE(0x85, 0x85) AM_DEVREAD("tms9928a", tms9928a_device, register_read)
AM_RANGE(0x88, 0x88) AM_DEVWRITE("ay8910", ay8910_device, address_w)
AM_RANGE(0x8c, 0x8c) AM_DEVWRITE("ay8910", ay8910_device, data_w)
AM_RANGE(0x90, 0x90) AM_DEVREAD("ay8910", ay8910_device, data_r)
- AM_RANGE(0x96, 0x97) AM_WRITE(ppi_w)
+ //AM_RANGE(0x96, 0x97) AM_WRITE(ppi_w)
AM_RANGE(0x98, 0x9a) AM_DEVREAD("ppi8255", i8255_device, read)
ADDRESS_MAP_END
static ADDRESS_MAP_START( svi328_806_io, AS_IO, 8, svi318_state )
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x58) AM_READWRITE(io_ext_r, io_ext_w )
- AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write)
- AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write)
- AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read)
- AM_RANGE(0x85, 0x85) AM_DEVREAD("tms9928a", tms9928a_device, register_read)
+ //AM_RANGE(0x00, 0x58) AM_READWRITE(io_ext_r, io_ext_w )
+ //AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write)
+ //AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write)
+ //AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read)
+ //AM_RANGE(0x85, 0x85) AM_DEVREAD("tms9928a", tms9928a_device, register_read)
AM_RANGE(0x88, 0x88) AM_DEVWRITE("ay8910", ay8910_device, address_w)
AM_RANGE(0x8c, 0x8c) AM_DEVWRITE("ay8910", ay8910_device, data_w)
AM_RANGE(0x90, 0x90) AM_DEVREAD("ay8910", ay8910_device, data_r)
- AM_RANGE(0x96, 0x97) AM_WRITE(ppi_w)
+ //AM_RANGE(0x96, 0x97) AM_WRITE(ppi_w)
AM_RANGE(0x98, 0x9a) AM_DEVREAD("ppi8255", i8255_device, read)
ADDRESS_MAP_END
@@ -257,7 +336,7 @@ SLOT_INTERFACE_END
static MACHINE_CONFIG_FRAGMENT( svi318_cartslot )
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "svi318_cart")
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_LOAD(svi318_state, svi318_cart)
+ //MCFG_GENERIC_LOAD(svi318_state, svi318_cart)
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","svi318_cart")
@@ -271,21 +350,21 @@ static MACHINE_CONFIG_START( svi318, svi318_state )
MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_DEVICE_ADD("ppi8255", I8255, 0)
- MCFG_I8255_IN_PORTA_CB(READ8(svi318_state, ppi_port_a_r))
- MCFG_I8255_IN_PORTB_CB(READ8(svi318_state, ppi_port_b_r))
- MCFG_I8255_OUT_PORTC_CB(WRITE8(svi318_state, ppi_port_c_w))
+ //MCFG_I8255_IN_PORTA_CB(READ8(svi318_state, ppi_port_a_r))
+ //MCFG_I8255_IN_PORTB_CB(READ8(svi318_state, ppi_port_b_r))
+ //MCFG_I8255_OUT_PORTC_CB(WRITE8(svi318_state, ppi_port_c_w))
MCFG_DEVICE_ADD("ins8250_0", INS8250, 1000000)
- MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt))
+ //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt))
MCFG_DEVICE_ADD("ins8250_1", INS8250, 3072000)
- MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt))
+ //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt))
/* Video hardware */
- MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2)
- MCFG_TMS9928A_VRAM_SIZE(0x4000)
- MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt))
- MCFG_TMS9928A_SCREEN_ADD_PAL("screen")
- MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update)
+ //MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2)
+ //MCFG_TMS9928A_VRAM_SIZE(0x4000)
+ //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt))
+ //MCFG_TMS9928A_SCREEN_ADD_PAL("screen")
+ //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update)
/* Sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -294,13 +373,13 @@ static MACHINE_CONFIG_START( svi318, svi318_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, 1789773)
- MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, psg_port_a_r))
- MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, psg_port_b_w))
+ //MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, psg_port_a_r))
+ //MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, psg_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
/* printer */
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(svi318_state, write_centronics_busy))
+ //MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(svi318_state, write_centronics_busy))
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
@@ -312,8 +391,8 @@ static MACHINE_CONFIG_START( svi318, svi318_state )
MCFG_SOFTWARE_LIST_ADD("cass_list", "svi318_cass")
MCFG_FD1793_ADD("wd179x", XTAL_1MHz)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(svi318_state, fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(svi318_state, fdc_drq_w))
+ //MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(svi318_state, fdc_intrq_w))
+ //MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(svi318_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD("wd179x:0", svi_floppies, "dd", svi318_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("wd179x:1", svi_floppies, "dd", svi318_state::floppy_formats)
@@ -330,13 +409,13 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( svi318n, svi318 )
- MCFG_DEVICE_REMOVE("tms9928a")
- MCFG_DEVICE_REMOVE("screen")
- MCFG_DEVICE_ADD("tms9928a", TMS9928A, XTAL_10_738635MHz / 2)
- MCFG_TMS9928A_VRAM_SIZE(0x4000)
- MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt))
- MCFG_TMS9928A_SCREEN_ADD_NTSC("screen")
- MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9928a_device, screen_update)
+ //MCFG_DEVICE_REMOVE("tms9928a")
+ //MCFG_DEVICE_REMOVE("screen")
+ //MCFG_DEVICE_ADD("tms9928a", TMS9928A, XTAL_10_738635MHz / 2)
+ //MCFG_TMS9928A_VRAM_SIZE(0x4000)
+ //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt))
+ //MCFG_TMS9928A_SCREEN_ADD_NTSC("screen")
+ //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9928a_device, screen_update)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( svi328, svi318 )
@@ -382,39 +461,39 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state )
MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_DEVICE_ADD("ppi8255", I8255, 0)
- MCFG_I8255_IN_PORTA_CB(READ8(svi318_state, ppi_port_a_r))
- MCFG_I8255_IN_PORTB_CB(READ8(svi318_state, ppi_port_b_r))
- MCFG_I8255_OUT_PORTC_CB(WRITE8(svi318_state, ppi_port_c_w))
+ //MCFG_I8255_IN_PORTA_CB(READ8(svi318_state, ppi_port_a_r))
+ //MCFG_I8255_IN_PORTB_CB(READ8(svi318_state, ppi_port_b_r))
+ //MCFG_I8255_OUT_PORTC_CB(WRITE8(svi318_state, ppi_port_c_w))
MCFG_DEVICE_ADD("ins8250_0", INS8250, 1000000)
- MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt))
+ //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt))
MCFG_DEVICE_ADD("ins8250_1", INS8250, 3072000)
- MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt))
+ //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt))
/* Video hardware */
MCFG_DEFAULT_LAYOUT(layout_dualhsxs)
- MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2)
- MCFG_TMS9928A_VRAM_SIZE(0x4000)
- MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt))
- MCFG_TMS9928A_SET_SCREEN("screen")
- MCFG_TMS9928A_SCREEN_ADD_PAL("screen")
- MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update)
+ //MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2)
+ //MCFG_TMS9928A_VRAM_SIZE(0x4000)
+ //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt))
+ //MCFG_TMS9928A_SET_SCREEN("screen")
+ //MCFG_TMS9928A_SCREEN_ADD_PAL("screen")
+ //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update)
MCFG_PALETTE_ADD("palette", TMS9928A_PALETTE_SIZE + 2) /* 2 additional entries for monochrome svi806 output */
- MCFG_SCREEN_ADD("svi806", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(640, 400)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1)
- MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
+ //MCFG_SCREEN_ADD("svi806", RASTER)
+ //MCFG_SCREEN_REFRESH_RATE(50)
+ //MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
+ //MCFG_SCREEN_SIZE(640, 400)
+ //MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1)
+ //MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
MCFG_GFXDECODE_ADD("gfxdecode", "palette", svi328)
- MCFG_MC6845_ADD("crtc", MC6845, "svi806", XTAL_12MHz / 8)
- MCFG_MC6845_SHOW_BORDER_AREA(false)
- MCFG_MC6845_CHAR_WIDTH(8) /* ? */
- MCFG_MC6845_UPDATE_ROW_CB(svi318_state, crtc_update_row)
+ //MCFG_MC6845_ADD("crtc", MC6845, "svi806", XTAL_12MHz / 8)
+ //MCFG_MC6845_SHOW_BORDER_AREA(false)
+ //MCFG_MC6845_CHAR_WIDTH(8) /* ? */
+ //MCFG_MC6845_UPDATE_ROW_CB(svi318_state, crtc_update_row)
/* Sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -423,13 +502,13 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state )
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, 1789773)
- MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, psg_port_a_r))
- MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, psg_port_b_w))
+ //MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, psg_port_a_r))
+ //MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, psg_port_b_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
/* printer */
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(svi318_state, write_centronics_busy))
+ //MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(svi318_state, write_centronics_busy))
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
@@ -441,8 +520,8 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state )
MCFG_SOFTWARE_LIST_ADD("cass_list", "svi318_cass")
MCFG_FD1793_ADD("wd179x", XTAL_1MHz)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(svi318_state, fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(svi318_state, fdc_drq_w))
+ //MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(svi318_state, fdc_intrq_w))
+ //MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(svi318_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD("wd179x:0", svi_floppies, "dd", svi318_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("wd179x:1", svi_floppies, "dd", svi318_state::floppy_formats)
@@ -459,8 +538,8 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( svi328n_806, svi328_806 )
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_REFRESH_RATE(60)
+ //MCFG_SCREEN_MODIFY("screen")
+ //MCFG_SCREEN_REFRESH_RATE(60)
MACHINE_CONFIG_END
/***************************************************************************
@@ -533,9 +612,9 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
-COMP( 1983, svi318, 0, 0, svi318, svi318, svi318_state, svi318, "Spectravideo", "SVI-318 (PAL)", MACHINE_SUPPORTS_SAVE )
-COMP( 1983, svi318n, svi318, 0, svi318n, svi318, svi318_state, svi318, "Spectravideo", "SVI-318 (NTSC)", MACHINE_SUPPORTS_SAVE )
-COMP( 1983, svi328, svi318, 0, svi328, svi328, svi318_state, svi318, "Spectravideo", "SVI-328 (PAL)", MACHINE_SUPPORTS_SAVE )
-COMP( 1983, svi328n, svi318, 0, svi328n, svi328, svi318_state, svi318, "Spectravideo", "SVI-328 (NTSC)", MACHINE_SUPPORTS_SAVE )
-COMP( 1983, sv328p80, svi318, 0, svi328_806, svi328, svi318_state, svi328_806, "Spectravideo", "SVI-328 (PAL) + SVI-806 80 column card", MACHINE_SUPPORTS_SAVE )
-COMP( 1983, sv328n80, svi318, 0, svi328n_806, svi328, svi318_state, svi328_806, "Spectravideo", "SVI-328 (NTSC) + SVI-806 80 column card", MACHINE_SUPPORTS_SAVE )
+COMP( 1983, svi318, 0, 0, svi318, svi318, driver_device, 0, "Spectravideo", "SVI-318 (PAL)", MACHINE_NOT_WORKING )
+COMP( 1983, svi318n, svi318, 0, svi318n, svi318, driver_device, 0, "Spectravideo", "SVI-318 (NTSC)", MACHINE_NOT_WORKING )
+COMP( 1983, svi328, svi318, 0, svi328, svi328, driver_device, 0, "Spectravideo", "SVI-328 (PAL)", MACHINE_NOT_WORKING )
+COMP( 1983, svi328n, svi318, 0, svi328n, svi328, driver_device, 0, "Spectravideo", "SVI-328 (NTSC)", MACHINE_NOT_WORKING )
+COMP( 1983, sv328p80, svi318, 0, svi328_806, svi328, driver_device, 0, "Spectravideo", "SVI-328 (PAL) + SVI-806 80 column card", MACHINE_NOT_WORKING )
+COMP( 1983, sv328n80, svi318, 0, svi328n_806, svi328, driver_device, 0, "Spectravideo", "SVI-328 (NTSC) + SVI-806 80 column card", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/tandy1t.cpp b/src/mame/drivers/tandy1t.cpp
index 3ba893c7610..cf1aabfc0ed 100644
--- a/src/mame/drivers/tandy1t.cpp
+++ b/src/mame/drivers/tandy1t.cpp
@@ -36,35 +36,51 @@ Tandy 1000 (80386) variations:
#include "machine/pckeybrd.h"
#include "machine/nvram.h"
#include "machine/pc_fdc.h"
+#include "machine/bankdev.h"
#include "video/pc_t1t.h"
#include "sound/sn76496.h"
#include "cpu/i86/i86.h"
#include "cpu/i86/i286.h"
-#include "bus/isa/isa.h"
-#include "bus/isa/isa_cards.h"
#include "softlist.h"
+class t1000_mb_device : public pc_noppi_mb_device
+{
+public:
+ // construction/destruction
+ t1000_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : pc_noppi_mb_device(mconfig, tag, owner, clock) { }
+protected:
+ virtual void device_start() override;
+};
+
+void t1000_mb_device::device_start()
+{
+}
+
+const device_type T1000_MOTHERBOARD = &device_creator<t1000_mb_device>;
+
class tandy1000_state : public driver_device
{
public:
tandy1000_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
- , m_romcs0(*this, "romcs0")
- , m_romcs1(*this, "romcs1")
, m_biosbank(*this, "biosbank")
, m_keyboard(*this, "pc_keyboard")
- , m_mb(*this, "mb") { }
+ , m_mb(*this, "mb")
+ , m_video(*this, "pcvideo_t1000")
+ , m_ram(*this, RAM_TAG)
+ , m_vram_bank(0) { }
required_device<cpu_device> m_maincpu;
// Memory regions for the machines that support rom banking
- optional_memory_region m_romcs0;
- optional_memory_region m_romcs1;
- optional_memory_bank m_biosbank;
+ optional_device<address_map_bank_device> m_biosbank;
required_device<pc_keyboard_device> m_keyboard;
- required_device<pc_noppi_mb_device> m_mb;
+ required_device<t1000_mb_device> m_mb;
+ required_device<pcvideo_t1000_device> m_video;
+ required_device<ram_device> m_ram;
DECLARE_WRITE8_MEMBER ( pc_t1t_p37x_w );
DECLARE_READ8_MEMBER ( pc_t1t_p37x_r );
@@ -73,13 +89,18 @@ public:
DECLARE_READ8_MEMBER(tandy1000_pio_r);
DECLARE_READ8_MEMBER( tandy1000_bank_r );
DECLARE_WRITE8_MEMBER( tandy1000_bank_w );
+ DECLARE_WRITE8_MEMBER( nmi_vram_bank_w );
+ DECLARE_WRITE8_MEMBER( vram_bank_w );
+ DECLARE_READ8_MEMBER( vram_r );
+ DECLARE_WRITE8_MEMBER( vram_w );
+ DECLARE_WRITE8_MEMBER( devctrl_w );
+ DECLARE_READ8_MEMBER( unk_r );
int tandy1000_read_eeprom();
void tandy1000_write_eeprom(UINT8 data);
void tandy1000_set_bios_bank();
- DECLARE_DRIVER_INIT(t1000hx);
- DECLARE_DRIVER_INIT(t1000sl);
+ void machine_start() override;
DECLARE_MACHINE_RESET(tandy1000rl);
@@ -97,6 +118,7 @@ public:
UINT8 m_tandy_bios_bank; /* I/O port FFEAh */
UINT8 m_tandy_ppi_portb, m_tandy_ppi_portc;
+ UINT8 m_vram_bank;
};
/* tandy 1000 eeprom
@@ -294,39 +316,64 @@ READ8_MEMBER(tandy1000_state::tandy1000_pio_r)
return data;
}
+WRITE8_MEMBER( tandy1000_state::nmi_vram_bank_w )
+{
+ m_mb->nmi_enable_w(space, 0, data & 0x80);
+ vram_bank_w(space, 0, data & 0x1e);
+ m_video->disable_w((data & 1) ? ASSERT_LINE : CLEAR_LINE);
+}
-void tandy1000_state::tandy1000_set_bios_bank()
+WRITE8_MEMBER( tandy1000_state::vram_bank_w )
{
- UINT8 *p = nullptr;
+ m_vram_bank = (data >> 1) & 7;
+}
- assert( m_romcs0 != nullptr );
- assert( m_romcs1 != nullptr );
- assert( m_biosbank != nullptr );
+WRITE8_MEMBER( tandy1000_state::devctrl_w )
+{
+ m_video->disable_w((data & 4) ? ASSERT_LINE : CLEAR_LINE);
+}
+
+READ8_MEMBER( tandy1000_state::unk_r )
+{
+ return 0; // status port?
+}
+
+READ8_MEMBER( tandy1000_state::vram_r )
+{
+ UINT8 vram_base = (m_ram->size() >> 17) - 1;
+ if((m_vram_bank - vram_base) == (offset >> 17))
+ return m_ram->pointer()[offset & 0x1ffff];
+ return 0xff;
+}
+
+WRITE8_MEMBER( tandy1000_state::vram_w )
+{
+ UINT8 vram_base = (m_ram->size() >> 17) - 1;
+ if((m_vram_bank - vram_base) == (offset >> 17))
+ m_ram->pointer()[offset & 0x1ffff] = data;
+}
+
+void tandy1000_state::tandy1000_set_bios_bank()
+{
+ int bank;
if ( m_tandy_bios_bank & 0x10 )
{
- if ( m_tandy_bios_bank & 0x04 )
+ if (m_tandy_bios_bank & 0x04 )
{
- p = m_romcs0->base() + ( m_tandy_bios_bank & 0x03 ) * 0x10000;
+ bank = (m_tandy_bios_bank & 3) + 8;
}
else
{
- p = m_romcs1->base() + ( m_tandy_bios_bank & 0x03 ) * 0x10000;
+ bank = m_tandy_bios_bank & 3;
}
}
else
{
- if ( m_tandy_bios_bank & 0x08 )
- {
- p = m_romcs0->base() + ( m_tandy_bios_bank & 0x07 ) * 0x10000;
- }
- else
- {
- p = m_romcs1->base() + ( m_tandy_bios_bank & 0x07 ) * 0x10000;
- }
+ bank = m_tandy_bios_bank & 0x0f;
}
- m_biosbank->set_base( p );
+ m_biosbank->set_bank( bank );
}
MACHINE_RESET_MEMBER(tandy1000_state, tandy1000rl)
@@ -335,28 +382,18 @@ MACHINE_RESET_MEMBER(tandy1000_state, tandy1000rl)
tandy1000_set_bios_bank();
}
-DRIVER_INIT_MEMBER(tandy1000_state,t1000hx)
+void tandy1000_state::machine_start()
{
+ m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - (128*1024) - 1, &m_ram->pointer()[128*1024]);
+ if(m_maincpu->space(AS_PROGRAM).data_width() == 8)
+ m_maincpu->space(AS_PROGRAM).install_readwrite_handler(m_ram->size() - (128*1024), 640*1024 - 1,
+ read8_delegate(FUNC(tandy1000_state::vram_r), this), write8_delegate(FUNC(tandy1000_state::vram_w), this));
+ else
+ m_maincpu->space(AS_PROGRAM).install_readwrite_handler(m_ram->size() - (128*1024), 640*1024 - 1,
+ read8_delegate(FUNC(tandy1000_state::vram_r), this), write8_delegate(FUNC(tandy1000_state::vram_w), this), 0xffff);
machine().device<nvram_device>("nvram")->set_base(m_eeprom_ee, sizeof(m_eeprom_ee));
}
-
-DRIVER_INIT_MEMBER(tandy1000_state,t1000sl)
-{
- // Fix up memory region (highest address bit flipped??)
- UINT8 *rom = memregion("romcs0")->base();
-
- for( int i = 0; i < 0x40000; i++ )
- {
- UINT8 d = rom[0x40000 + i];
- rom[0x40000 + i] = rom[i];
- rom[i] = d;
- }
-
- DRIVER_INIT_NAME(t1000hx)();
-}
-
-
READ8_MEMBER( tandy1000_state::tandy1000_bank_r )
{
UINT8 data = 0xFF;
@@ -467,61 +504,64 @@ static INPUT_PORTS_START( tandy1t )
INPUT_PORTS_END
static ADDRESS_MAP_START(tandy1000_map, AS_PROGRAM, 8, tandy1000_state )
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xaffff) AM_RAM
- AM_RANGE(0xb0000, 0xb7fff) AM_NOP
- AM_RANGE(0xb8000, 0xbffff) AM_DEVREADWRITE("pcvideo_t1000", pcvideo_t1000_device, videoram_r, videoram_w);
- AM_RANGE(0xc0000, 0xc7fff) AM_NOP
- AM_RANGE(0xc8000, 0xc9fff) AM_ROM
- AM_RANGE(0xca000, 0xcffff) AM_NOP
- AM_RANGE(0xd0000, 0xeffff) AM_NOP
- AM_RANGE(0xf0000, 0xfffff) AM_ROM
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0xb8000, 0xbffff) AM_DEVICE("pcvideo_t1000:vram", address_map_bank_device, amap8)
+ AM_RANGE(0xe0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(tandy1000_io, AS_IO, 8, tandy1000_state )
- AM_RANGE(0x0060, 0x0063) AM_READWRITE(tandy1000_pio_r, tandy1000_pio_w)
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0060, 0x0063) AM_READWRITE(tandy1000_pio_r, tandy1000_pio_w)
+ AM_RANGE(0x00a0, 0x00a0) AM_WRITE(nmi_vram_bank_w)
AM_RANGE(0x00c0, 0x00c0) AM_DEVWRITE("sn76496", ncr7496_device, write)
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", t1000_mb_device, map)
AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE("pc_joy", pc_joy_device, joy_port_r, joy_port_w)
- AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_t1t_p37x_r, pc_t1t_p37x_w)
+ AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_t1t_p37x_r, pc_t1t_p37x_w)
AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE("pcvideo_t1000", pcvideo_t1000_device, read, write)
ADDRESS_MAP_END
-static ADDRESS_MAP_START(tandy1000_16_map, AS_PROGRAM, 16, tandy1000_state )
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xaffff) AM_RAM
- AM_RANGE(0xb0000, 0xb7fff) AM_NOP
- AM_RANGE(0xb8000, 0xbffff) AM_DEVREADWRITE8("pcvideo_t1000", pcvideo_t1000_device, videoram_r, videoram_w, 0xffff)
- AM_RANGE(0xc0000, 0xc7fff) AM_NOP
- AM_RANGE(0xc8000, 0xc9fff) AM_ROM
- AM_RANGE(0xca000, 0xcffff) AM_NOP
- AM_RANGE(0xe0000, 0xeffff) AM_ROMBANK("biosbank") /* Banked part of the BIOS */
- AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION( "romcs0", 0x70000 )
+static ADDRESS_MAP_START(tandy1000_bank_map, AS_PROGRAM, 16, tandy1000_state )
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0xb8000, 0xbffff) AM_DEVICE8("pcvideo_t1000:vram", address_map_bank_device, amap8, 0xffff)
+ AM_RANGE(0xe0000, 0xeffff) AM_DEVICE("biosbank", address_map_bank_device, amap16)
+ AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION( "rom", 0x70000 )
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START(biosbank_map, AS_0, 16, tandy1000_state)
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x80000, 0xfffff) AM_ROM AM_REGION("rom", 0)
ADDRESS_MAP_END
static ADDRESS_MAP_START(tandy1000_16_io, AS_IO, 16, tandy1000_state )
- AM_RANGE(0x0060, 0x0063) AM_READWRITE8(tandy1000_pio_r, tandy1000_pio_w, 0xffff)
- AM_RANGE(0x00c0, 0x00c1) AM_DEVWRITE8("sn76496", ncr7496_device, write, 0xffff)
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0060, 0x0063) AM_READWRITE8(tandy1000_pio_r, tandy1000_pio_w, 0xffff)
+ AM_RANGE(0x0064, 0x0065) AM_WRITE8(devctrl_w, 0xff00)
+ AM_RANGE(0x00a0, 0x00a1) AM_READ8(unk_r, 0x00ff)
+ AM_RANGE(0x00c0, 0x00c1) AM_DEVWRITE8("sn76496", ncr7496_device, write, 0xffff)
+ AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", t1000_mb_device, map, 0xffff)
AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
- AM_RANGE(0x0378, 0x037f) AM_READWRITE8(pc_t1t_p37x_r, pc_t1t_p37x_w, 0xffff)
+ AM_RANGE(0x0378, 0x037f) AM_READWRITE8(pc_t1t_p37x_r, pc_t1t_p37x_w, 0xffff)
AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("pcvideo_t1000", pcvideo_t1000_device, read, write, 0xffff)
+ AM_RANGE(0xffe8, 0xffe9) AM_WRITE8(vram_bank_w, 0x00ff)
ADDRESS_MAP_END
-static ADDRESS_MAP_START(tandy1000_16_bank_io, AS_IO, 16, tandy1000_state )
+static ADDRESS_MAP_START(tandy1000_bank_io, AS_IO, 16, tandy1000_state )
+ ADDRESS_MAP_UNMAP_HIGH
AM_IMPORT_FROM(tandy1000_16_io)
AM_RANGE(0xffea, 0xffeb) AM_READWRITE8(tandy1000_bank_r, tandy1000_bank_w, 0xffff)
ADDRESS_MAP_END
+static ADDRESS_MAP_START(tandy1000tx_io, AS_IO, 16, tandy1000_state )
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x00a0, 0x00a1) AM_WRITE8(nmi_vram_bank_w, 0x00ff)
+ AM_IMPORT_FROM(tandy1000_16_io)
+ADDRESS_MAP_END
+
static ADDRESS_MAP_START(tandy1000_286_map, AS_PROGRAM, 16, tandy1000_state )
+ ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0x000fffff)
- AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
- AM_RANGE(0xa0000, 0xaffff) AM_RAM
- AM_RANGE(0xb0000, 0xb7fff) AM_NOP
- AM_RANGE(0xb8000, 0xbffff) AM_DEVREADWRITE8("pcvideo_t1000", pcvideo_t1000_device, videoram_r, videoram_w, 0xffff)
- AM_RANGE(0xc0000, 0xc7fff) AM_NOP
- AM_RANGE(0xc8000, 0xc9fff) AM_ROM
- AM_RANGE(0xca000, 0xcffff) AM_NOP
- AM_RANGE(0xe0000, 0xeffff) AM_NOP
- AM_RANGE(0xf8000, 0xfffff) AM_ROM
+ AM_RANGE(0xb8000, 0xbffff) AM_DEVICE8("pcvideo_t1000:vram", address_map_bank_device, amap8, 0xffff)
+ AM_RANGE(0xe0000, 0xfffff) AM_ROM AM_REGION("bios", 0)
ADDRESS_MAP_END
static const gfx_layout t1000_charlayout =
@@ -555,7 +595,8 @@ static GFXDECODE_START( t1000 )
GFXDECODE_END
static MACHINE_CONFIG_FRAGMENT(tandy1000_common)
- MCFG_PCNOPPI_MOTHERBOARD_ADD("mb", "maincpu")
+ MCFG_DEVICE_ADD("mb", T1000_MOTHERBOARD, 0)
+ t1000_mb_device::static_set_cputag(*device, "maincpu");
/* video hardware */
MCFG_PCVIDEO_T1000_ADD("pcvideo_t1000")
@@ -591,6 +632,8 @@ static MACHINE_CONFIG_START( t1000hx, tandy1000_state )
// plus cards are isa with a nonstandard conntector
MCFG_ISA8_SLOT_ADD("mb:isa", "plus1", pc_isa8_cards, nullptr, false)
+ MCFG_DEVICE_MODIFY(RAM_TAG)
+ MCFG_RAM_EXTRA_OPTIONS("256K, 384K")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( t1000sx, t1000hx )
@@ -604,21 +647,31 @@ static MACHINE_CONFIG_DERIVED( t1000sx, t1000hx )
/* software lists */
MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150")
+ MCFG_DEVICE_MODIFY(RAM_TAG)
+ MCFG_RAM_EXTRA_OPTIONS("384K")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( t1000_16, tandy1000_state )
+static MACHINE_CONFIG_START( t1000rl, tandy1000_state )
MCFG_CPU_ADD("maincpu", I8086, XTAL_28_63636MHz / 3)
- MCFG_CPU_PROGRAM_MAP(tandy1000_16_map)
- MCFG_CPU_IO_MAP(tandy1000_16_bank_io)
+ MCFG_CPU_PROGRAM_MAP(tandy1000_bank_map)
+ MCFG_CPU_IO_MAP(tandy1000_bank_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
MCFG_FRAGMENT_ADD(tandy1000_common)
- MCFG_MACHINE_RESET_OVERRIDE(tandy1000_state,tandy1000rl)
+ MCFG_DEVICE_ADD("biosbank", ADDRESS_MAP_BANK, 0)
+ MCFG_DEVICE_PROGRAM_MAP(biosbank_map)
+ MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE)
+ MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(16)
+ MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(20)
+ MCFG_ADDRESS_MAP_BANK_STRIDE(0x10000)
+ MCFG_MACHINE_RESET_OVERRIDE(tandy1000_state,tandy1000rl)
+ MCFG_DEVICE_MODIFY(RAM_TAG)
+ MCFG_RAM_EXTRA_OPTIONS("384K")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( t1000_16_8, t1000_16 )
+static MACHINE_CONFIG_DERIVED( t1000sl2, t1000rl )
MCFG_CPU_MODIFY( "maincpu" )
MCFG_CPU_CLOCK( XTAL_24MHz / 3 )
@@ -628,7 +681,7 @@ static MACHINE_CONFIG_DERIVED( t1000_16_8, t1000_16 )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, nullptr, false)
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( t1000_286, tandy1000_state )
+static MACHINE_CONFIG_START( t1000tl, tandy1000_state )
MCFG_CPU_ADD("maincpu", I80286, XTAL_28_63636MHz / 2)
MCFG_CPU_PROGRAM_MAP(tandy1000_286_map)
MCFG_CPU_IO_MAP(tandy1000_16_io)
@@ -643,14 +696,19 @@ static MACHINE_CONFIG_START( t1000_286, tandy1000_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, nullptr, false)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( t1000tx, t1000tl )
+ MCFG_CPU_MODIFY( "maincpu" )
+ MCFG_CPU_IO_MAP(tandy1000tx_io)
+MACHINE_CONFIG_END
+
#ifdef UNUSED_DEFINITION
ROM_START( t1000 )
// Schematics displays 2 32KB ROMs at U9 and U10
- ROM_REGION(0x100000,"maincpu", 0)
+ ROM_REGION(0x20000,"bios", 0)
ROM_SYSTEM_BIOS( 0, "v010000", "v010000" )
- ROMX_LOAD("v010000.f0", 0xf0000, 0x10000, NO_DUMP, ROM_BIOS(1))
+ ROMX_LOAD("v010000.f0", 0x10000, 0x10000, NO_DUMP, ROM_BIOS(1))
ROM_SYSTEM_BIOS( 1, "v010100", "v010100" )
- ROMX_LOAD("v010100.f0", 0xf0000, 0x10000, CRC(b6760881) SHA1(8275e4c48ac09cf36685db227434ca438aebe0b9), ROM_BIOS(2))
+ ROMX_LOAD("v010100.f0", 0x10000, 0x10000, CRC(b6760881) SHA1(8275e4c48ac09cf36685db227434ca438aebe0b9), ROM_BIOS(2))
// Part of video array at u76?
ROM_REGION(0x08000,"gfx1", 0)
@@ -658,21 +716,21 @@ ROM_START( t1000 )
ROM_END
ROM_START( t1000a )
- ROM_REGION(0x100000,"maincpu", 0)
+ ROM_REGION(0x20000,"bios", 0)
// partlist says it has 1 128kbyte rom
- ROM_LOAD("t1000hx.e0", 0xe0000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one
- ROM_LOAD("v010100.f0", 0xf0000, 0x10000, CRC(b6760881) SHA1(8275e4c48ac09cf36685db227434ca438aebe0b9))
+ ROM_LOAD("t1000hx.e0", 0x00000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one
+ ROM_LOAD("v010100.f0", 0x10000, 0x10000, CRC(b6760881) SHA1(8275e4c48ac09cf36685db227434ca438aebe0b9))
ROM_REGION(0x08000,"gfx1", 0)
ROM_LOAD("8079027.u25", 0x00000, 0x04000, CRC(33d64a11) SHA1(b63da2a656b6c0a8a32f2be8bdcb51aed983a450)) // TODO: Verify location
ROM_END
ROM_START( t1000ex )
- ROM_REGION(0x100000,"maincpu", 0)
+ ROM_REGION(0x20000,"bios", 0)
// partlist says it has 1 128kb rom, schematics list a 32k x 8 rom
// "8040328.u17"
- ROM_LOAD("t1000hx.e0", 0xe0000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one
- ROM_LOAD("v010200.f0", 0xf0000, 0x10000, CRC(0e016ecf) SHA1(2f5ac8921b7cba56b02122ef772f5f11bbf6d8a2))
+ ROM_LOAD("t1000hx.e0", 0x00000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one
+ ROM_LOAD("v010200.f0", 0x10000, 0x10000, CRC(0e016ecf) SHA1(2f5ac8921b7cba56b02122ef772f5f11bbf6d8a2))
// TODO: Add dump of the 8048 at u8 if it ever gets dumped
ROM_REGION(0x400, "kbdc", 0)
@@ -685,22 +743,22 @@ ROM_END
// The T1000SL and T1000SL/2 only differ in amount of RAM installed and BIOS version (SL/2 has v01.04.04)
ROM_START( t1000sl )
- ROM_REGION(0x100000,"maincpu", 0)
+ ROM_REGION(0x20000,"bios", 0)
// 8076312.hu1 - most likely v01.04.00
// 8075312.hu2
// partlist says it has 1 128kbyte rom
- ROM_LOAD("t1000hx.e0", 0xe0000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one
+ ROM_LOAD("t1000hx.e0", 0x00000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one
ROM_SYSTEM_BIOS( 0, "v010400", "v010400" )
- ROMX_LOAD("v010400.f0", 0xf0000, 0x10000, NO_DUMP, ROM_BIOS(1) )
+ ROMX_LOAD("v010400.f0", 0x10000, 0x10000, NO_DUMP, ROM_BIOS(1) )
ROM_SYSTEM_BIOS( 1, "v010401", "v010401" )
- ROMX_LOAD("v010401.f0", 0xf0000, 0x10000, NO_DUMP, ROM_BIOS(2) )
+ ROMX_LOAD("v010401.f0", 0x10000, 0x10000, NO_DUMP, ROM_BIOS(2) )
ROM_SYSTEM_BIOS( 2, "v010402", "v010402" )
- ROMX_LOAD("v010402.f0", 0xf0000, 0x10000, NO_DUMP, ROM_BIOS(3) )
+ ROMX_LOAD("v010402.f0", 0x10000, 0x10000, NO_DUMP, ROM_BIOS(3) )
ROM_SYSTEM_BIOS( 3, "v020001", "v020001" )
- ROMX_LOAD("v020001.f0", 0xf0000, 0x10000, NO_DUMP, ROM_BIOS(4) )
+ ROMX_LOAD("v020001.f0", 0x10000, 0x10000, NO_DUMP, ROM_BIOS(4) )
ROM_REGION(0x08000,"gfx1", 0)
ROM_LOAD("8079027.u25", 0x00000, 0x04000, CRC(33d64a11) SHA1(b63da2a656b6c0a8a32f2be8bdcb51aed983a450))
@@ -708,7 +766,7 @@ ROM_END
ROM_START( t1000tl )
- ROM_REGIoN(0x100000, "maincpu", ROMREGION_ERASE00)
+ ROM_REGIoN(0x10000, "bios", ROMREGION_ERASE00)
ROM_REGION(0x80000, "romcs0", 0)
// These 2 sets most likely have the same contents
@@ -731,8 +789,8 @@ ROM_END
#endif
ROM_START( t1000hx )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD("v020000.u12", 0xe0000, 0x20000, CRC(6f3acd80) SHA1(976af8c04c3f6fde14d7047f6521d302bdc2d017)) // TODO: Rom label
+ ROM_REGION(0x20000,"bios", 0)
+ ROM_LOAD("v020000.u12", 0x00000, 0x20000, CRC(6f3acd80) SHA1(976af8c04c3f6fde14d7047f6521d302bdc2d017)) // TODO: Rom label
// TODO: Add dump of the 8048 at u9 if it ever gets dumped
ROM_REGION(0x400, "kbdc", 0)
@@ -743,8 +801,8 @@ ROM_START( t1000hx )
ROM_END
ROM_START( t1000sx )
- ROM_REGION(0x100000,"maincpu", 0)
- ROM_LOAD("8040328.u41", 0xf8000, 0x8000, CRC(4e2b9f0b) SHA1(e79a9ed9e885736e30d9b135557f0e596ce5a70b))
+ ROM_REGION(0x20000,"bios", 0)
+ ROM_LOAD("8040328.u41", 0x18000, 0x8000, CRC(4e2b9f0b) SHA1(e79a9ed9e885736e30d9b135557f0e596ce5a70b))
// No character rom is listed in the schematics?
// But disabling it results in no text being printed
@@ -755,10 +813,10 @@ ROM_END
ROM_START( t1000tx )
- ROM_REGION(0x100000,"maincpu", 0)
+ ROM_REGION(0x20000,"bios", 0)
// There should be 2 32KBx8 ROMs, one for odd at u38, one for even at u39
// The machine already boots up with just this one rom
- ROM_LOAD("t1000tx.bin", 0xf8000, 0x8000, BAD_DUMP CRC(9b34765c) SHA1(0b07e87f6843393f7d4ca4634b832b0c0bec304e))
+ ROM_LOAD("t1000tx.bin", 0x18000, 0x8000, BAD_DUMP CRC(9b34765c) SHA1(0b07e87f6843393f7d4ca4634b832b0c0bec304e))
// No character rom is listed in the schematics?
// It is most likely part of the big blue chip at u36
@@ -768,14 +826,11 @@ ROM_END
ROM_START( t1000rl )
- ROM_REGION(0x100000,"maincpu", ROMREGION_ERASE00)
-
// bankable ROM regions
- ROM_REGION(0x80000, "romcs0", 0)
+ ROM_REGION(0x80000, "rom", 0)
/* v2.0.0.1 */
/* Rom is labeled "(C) TANDY CORP. 1990 // 8079073 // LH534G70 JAPAN // 9034 D" */
ROM_LOAD("8079073.u23", 0x00000, 0x80000, CRC(6fab50f7) SHA1(2ccc02bee4c250dc1b7c17faef2590bc158860b0) )
- ROM_REGION(0x80000, "romcs1", ROMREGION_ERASEFF)
ROM_REGION(0x08000,"gfx1", 0)
/* Character rom located at U3 w/label "8079027 // NCR // 609-2495004 // F841030 A9025" */
@@ -784,14 +839,14 @@ ROM_END
ROM_START( t1000sl2 )
- ROM_REGION(0x100000,"maincpu", ROMREGION_ERASE00)
-
// bankable ROM regions
- ROM_REGION(0x80000, "romcs0", 0)
+ ROM_REGION(0x80000, "rom", 0)
// v01.04.04 BIOS
- ROM_LOAD16_BYTE("8079047.hu1", 0x00000, 0x40000, CRC(c773ec0e) SHA1(7deb71f14c2c418400b639d60066ab61b7e9df32))
- ROM_LOAD16_BYTE("8079048.hu2", 0x00001, 0x40000, CRC(0f3e6586) SHA1(10f1a7204f69b82a18bc94a3010c9660aec0c802))
- ROM_REGION(0x80000, "romcs1", ROMREGION_ERASEFF)
+ // Fix up memory region (highest address bit flipped??)
+ ROM_LOAD16_BYTE("8079047.hu1", 0x40000, 0x20000, CRC(c773ec0e) SHA1(7deb71f14c2c418400b639d60066ab61b7e9df32))
+ ROM_CONTINUE(0x00000, 0x20000)
+ ROM_LOAD16_BYTE("8079048.hu2", 0x40001, 0x20000, CRC(0f3e6586) SHA1(10f1a7204f69b82a18bc94a3010c9660aec0c802))
+ ROM_CONTINUE(0x00001, 0x20000)
ROM_REGION(0x08000,"gfx1", 0)
ROM_LOAD("8079027.u25", 0x00000, 0x04000, CRC(33d64a11) SHA1(b63da2a656b6c0a8a32f2be8bdcb51aed983a450))
@@ -802,8 +857,8 @@ ROM_END
ROM_START( t1000tl2 )
- ROM_REGION(0x100000, "maincpu", 0)
- ROM_LOAD( "t10000tl2.bin", 0xf0000, 0x10000, CRC(e288f12c) SHA1(9d54ccf773cd7202c9906323f1b5a68b1b3a3a67))
+ ROM_REGION(0x20000, "bios", 0)
+ ROM_LOAD( "t10000tl2.bin", 0x10000, 0x10000, CRC(e288f12c) SHA1(9d54ccf773cd7202c9906323f1b5a68b1b3a3a67))
ROM_REGION(0x08000,"gfx1", 0)
ROM_LOAD("8079027.u24", 0x00000, 0x04000, CRC(33d64a11) SHA1(b63da2a656b6c0a8a32f2be8bdcb51aed983a450)) // TODO: Verify location
@@ -812,9 +867,9 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
// tandy 1000
-COMP( 1987, t1000hx, ibm5150, 0, t1000hx, tandy1t, tandy1000_state, t1000hx, "Tandy Radio Shack", "Tandy 1000 HX", 0)
-COMP( 1987, t1000sx, ibm5150, 0, t1000sx, tandy1t, tandy1000_state, t1000hx, "Tandy Radio Shack", "Tandy 1000 SX", 0)
-COMP( 1987, t1000tx, ibm5150, 0, t1000_286, tandy1t, tandy1000_state, t1000hx, "Tandy Radio Shack", "Tandy 1000 TX", 0)
-COMP( 1989, t1000rl, ibm5150, 0, t1000_16, tandy1t, tandy1000_state, t1000hx, "Tandy Radio Shack", "Tandy 1000 RL", 0)
-COMP( 1989, t1000tl2, ibm5150, 0, t1000_286, tandy1t, tandy1000_state, t1000hx, "Tandy Radio Shack", "Tandy 1000 TL/2", 0)
-COMP( 1988, t1000sl2, ibm5150, 0, t1000_16_8, tandy1t, tandy1000_state, t1000sl, "Tandy Radio Shack", "Tandy 1000 SL/2", 0)
+COMP( 1987, t1000hx, ibm5150, 0, t1000hx, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 HX", 0)
+COMP( 1987, t1000sx, ibm5150, 0, t1000sx, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 SX", 0)
+COMP( 1987, t1000tx, ibm5150, 0, t1000tx, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 TX", 0)
+COMP( 1989, t1000rl, ibm5150, 0, t1000rl, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 RL", 0)
+COMP( 1989, t1000tl2, ibm5150, 0, t1000tl, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 TL/2", 0)
+COMP( 1988, t1000sl2, ibm5150, 0, t1000sl2, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 SL/2", 0)
diff --git a/src/mame/drivers/tecmo16.cpp b/src/mame/drivers/tecmo16.cpp
index 9ef5e52641b..820de48507a 100644
--- a/src/mame/drivers/tecmo16.cpp
+++ b/src/mame/drivers/tecmo16.cpp
@@ -1,5 +1,5 @@
-// license:???
-// copyright-holders:Eisuke Watanabe, Nicola Salmoria
+// license:BSD-3-Clause
+// copyright-holders:Hau, Nicola Salmoria
/******************************************************************************
Ganbare Ginkun (Japan) (c)1995 TECMO
@@ -8,7 +8,7 @@
--
-driver by Eisuke Watanabe, Nicola Salmoria
+driver by Hau, Nicola Salmoria
special thanks to Nekomata, NTD & code-name'Siberia'
diff --git a/src/mame/drivers/ticalc1x.cpp b/src/mame/drivers/ticalc1x.cpp
index c8bbdfd0171..3d0a0cceeae 100644
--- a/src/mame/drivers/ticalc1x.cpp
+++ b/src/mame/drivers/ticalc1x.cpp
@@ -48,11 +48,11 @@ public:
/***************************************************************************
TI SR-16 (1974, first consumer product with TMS1000 series MCU)
- * TMS1000 MCU labeled TMS1001NL (die labeled 1000, 1001A)
+ * TMS1000 MCU label TMS1001NL (die label 1000, 1001A)
* 12-digit 7seg LED display
TI SR-16 II (1975 version)
- * TMS1000 MCU labeled TMS1016NL (die labeled 1000B, 1016A)
+ * TMS1000 MCU label TMS1016NL (die label 1000B, 1016A)
* notes: cost-reduced 'sequel', [10^x] was removed, and [pi] was added.
***************************************************************************/
@@ -264,11 +264,11 @@ MACHINE_CONFIG_END
/***************************************************************************
TI-1250/TI-1200 (1975 version), Spirit of '76
- * TMS0950 MCU labeled TMC0952NL, K0952 (die labeled 0950A 0952)
+ * TMS0950 MCU label TMC0952NL, K0952 (die label 0950A 0952)
* 9-digit 7seg LED display
TI-1250/TI-1200 (1976 version), TI-1400, TI-1450, TI-1205, TI-1255, LADY 1200, ABLE
- * TMS0970 MCU labeled TMS0972NL ZA0348, JP0972A (die labeled 0970D-72A)
+ * TMS0970 MCU label TMS0972NL ZA0348, JP0972A (die label 0970D-72A)
* 8-digit 7seg LED display, or 9 digits with leftmost unused
As seen listed above, the basic 4-function TMS0972 calculator MCU was used
@@ -280,7 +280,7 @@ MACHINE_CONFIG_END
available buttons.
TI-1270
- * TMS0970 MCU labeled TMC0974NL ZA0355, DP0974A (die labeled 0970D-74A)
+ * TMS0970 MCU label TMC0974NL ZA0355, DP0974A (die label 0970D-74A)
* 8-digit 7seg LED display
* notes: almost same hardware as TMS0972 TI-1250, minor scientific functions
@@ -413,11 +413,11 @@ MACHINE_CONFIG_END
/***************************************************************************
TI-1000 (1977 version)
- * TMS1990 MCU labeled TMC1991NL (die labeled 1991-91A)
+ * TMS1990 MCU label TMC1991NL (die label 1991-91A)
* 8-digit 7seg LED display
TI-1000 (1978 version)
- * TMS1990 MCU labeled TMC1992-4NL **not dumped yet
+ * TMS1990 MCU label TMC1992-4NL **not dumped yet
***************************************************************************/
@@ -513,7 +513,7 @@ MACHINE_CONFIG_END
/***************************************************************************
TI WIZ-A-TRON
- * TMS0970 MCU labeled TMC0907NL ZA0379, DP0907BS (die labeled 0970F-07B)
+ * TMS0970 MCU label TMC0907NL ZA0379, DP0907BS (die label 0970F-07B)
* 9-digit 7seg LED display(one custom digit)
***************************************************************************/
@@ -613,7 +613,7 @@ MACHINE_CONFIG_END
/***************************************************************************
TI Little Professor (1976 version)
- * TMS0970 MCU labeled TMS0975NL ZA0356, GP0975CS (die labeled 0970D-75C)
+ * TMS0970 MCU label TMS0975NL ZA0356, GP0975CS (die label 0970D-75C)
* 9-digit 7seg LED display(one custom digit)
The hardware is nearly identical to Wiz-A-Tron (or vice versa, since this
@@ -687,7 +687,7 @@ MACHINE_CONFIG_END
/***************************************************************************
TI Little Professor (1978 version)
- * TMS1990 MCU labeled TMC1993NL (die labeled 1990C-c3C)
+ * TMS1990 MCU label TMC1993NL (die label 1990C-c3C)
* 9-digit 7seg LED display(one custom digit)
1978 re-release, with on/off and level select on buttons instead of
@@ -797,7 +797,7 @@ MACHINE_CONFIG_END
/***************************************************************************
TI DataMan
- * TMS1980 MCU labeled TMC1982NL (die labeled 1980A 82B)
+ * TMS1980 MCU label TMC1982NL (die label 1980A 82B)
* 10-digit cyan VFD display(3 digits are custom)
***************************************************************************/
@@ -912,7 +912,7 @@ MACHINE_CONFIG_END
TMC098x series Majestic-line calculators
TI-30, SR-40, TI-15(less buttons) and several by Koh-I-Noor
- * TMS0980 MCU labeled TMC0981NL (die labeled 0980B-81F)
+ * TMS0980 MCU label TMC0981NL (die label 0980B-81F)
* 9-digit 7seg LED display
Of note is a peripheral by Schoenherr, called the Braillotron. It acts as
@@ -921,10 +921,10 @@ MACHINE_CONFIG_END
the original LED display to a 25-pin D-Sub connector.
TI Business Analyst, TI Business Analyst-I, TI Money Manager, TI-31, TI-41
- * TMS0980 MCU labeled TMC0982NL (die labeled 0980B-82F)
+ * TMS0980 MCU label TMC0982NL (die label 0980B-82F)
TI Programmer
- * TMS0980 MCU labeled ZA0675NL, JP0983AT (die labeled 0980B-83)
+ * TMS0980 MCU label ZA0675NL, JP0983AT (die label 0980B-83)
***************************************************************************/
diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp
index 68cae4eb3ce..f6bd51bca24 100644
--- a/src/mame/drivers/tispeak.cpp
+++ b/src/mame/drivers/tispeak.cpp
@@ -34,7 +34,7 @@ Wiz-A-Tron or Little Professor. But the popularity of this product was much
above expectations. TI continued to manufacture many products for this line.
Speak & Spell (US), 1978
- - MCU: TMC0271*, labeled TMC0271NL (die label unknown)
+ - MCU: TMC0271*, label TMC0271NL (die label unknown)
- TMS51xx: TMC0281
- VSM(1/2): 16KB TMC0351NL
- VSM(2/2): 16KB TMC0352NL
@@ -42,7 +42,7 @@ above expectations. TI continued to manufacture many products for this line.
- notes: keyboard has buttons instead of cheap membrane
Speak & Spell (US), 1979
- - MCU: TMC0271, labeled TMC0271H-N2L (die labeled 0271H T0270D)
+ - MCU: TMC0271, label TMC0271H-N2L (die label 0271H T0270D)
- TMS51xx: TMC0281
- VSM(1/2): 16KB TMC0351N2L
- VSM(2/2): 16KB TMC0352N2L
@@ -79,8 +79,15 @@ above expectations. TI continued to manufacture many products for this line.
- VFD: some seen with the one from Speak & Math(!)
- notes: this one has a dedicated voice actor
+ Speak & Spell (Spanish), 1981
+ - MCU: CD2701N2L*
+ - TMS51xx: TMC0281
+ - VSM(1/2): 16KB? CD2319*
+ - VSM(2/2): 16KB? CD2320*
+ - VFD: 8 digits with 14 segments, DP and accent mark
+
Speak & Spell (France) "La Dictee Magique", 1980
- - MCU: CD2702, labeled CD2702AN2L (die labeled TMC0270F 2702A)
+ - MCU: CD2702, label CD2702AN2L (die label TMC0270F 2702A)
- TMS51xx: CD2801
- VSM: 16KB CD2352
@@ -96,7 +103,7 @@ above expectations. TI continued to manufacture many products for this line.
- notes: it appears that TI ran out of original snspell VFDs in the early 80s?
Speak & Spell Compact (US), 1981
- - MCU: CD8011, labeled CD8011A-NL (die labeled 1100B)
+ - MCU: CD8011, label CD8011A-NL (die label 1100B)
- TMS51xx: TMC0281D
- VSM: 16KB CD2354, CD2354(rev.A)
- notes: no display, MCU is TMS1100 instead of TMS0270, overall similar to Touch & Tell
@@ -143,7 +150,7 @@ Note that they are interchangeable, eg. you can use a French module on a US Spea
Speak & Math:
Speak & Math (US), 1980 (renamed to "Speak & Maths" in UK, but is the same product)
- - MCU: CD2704, labeled CD2704B-N2L (die labeled TMC0270F 2704B) - 2nd revision?(mid-1982)
+ - MCU: CD2704, label CD2704B-N2L (die label TMC0270F 2704B) - 2nd revision?(mid-1982)
- TMS51xx: CD2801
- VSM(1/2): 16KB CD2392
- VSM(2/2): 16KB CD2393
@@ -154,7 +161,7 @@ Speak & Math:
Apparently QA never found out and it ended up in the final product.
Speak & Math (US), 1986
- - MCU: CD2708, labeled CD2708N2L (die labeled TMC0270F 2708A)
+ - MCU: CD2708, label CD2708N2L (die label TMC0270F 2708A)
- TMS51xx: CD2801
- VSM(1/2): 16KB CD2381
- VSM(2/2): 4KB CD2614
@@ -170,7 +177,7 @@ Speak & Math:
Speak & Read:
Speak & Read (US), 1980
- - MCU: CD2705, labeled CD2705B-N2L (die labeled TMC0270E 2705B) - 2nd revision?(late-1981)
+ - MCU: CD2705, label CD2705B-N2L (die label TMC0270E 2705B) - 2nd revision?(late-1981)
- TMS51xx: CD2801
- VSM(1/2): 16KB CD2394(rev.A)
- VSM(2/2): 16KB CD2395(rev.A)
@@ -192,7 +199,7 @@ Speak & Read modules:
Touch & Tell:
Touch & Tell (US), 1981
- - MCU: CD8012, labeled CD8012NL (die labeled 1100G CD8012)
+ - MCU: CD8012, label CD8012NL (die label 1100G CD8012)
- TMS51xx: CD2802
- VSM: 4KB CD2610
- notes: MCU is TMS1100 instead of TMS0270. CD8010 is seen in some devices
diff --git a/src/mame/drivers/tispellb.cpp b/src/mame/drivers/tispellb.cpp
index 00f581759ef..9966dc2a534 100644
--- a/src/mame/drivers/tispellb.cpp
+++ b/src/mame/drivers/tispellb.cpp
@@ -13,8 +13,8 @@
1st revision:
Spelling B (US), 1978
- - TMS0270 MCU TMC0272 (die labeled 0272A T0270B)
- - TMS1980 MCU TMC1984 (die labeled 1980A 84A)
+ - TMS0270 MCU TMC0272 (die label 0272A T0270B)
+ - TMS1980 MCU TMC1984 (die label 1980A 84A)
- 8-digit cyan VFD display (seen with and without apostrophe)
Spelling ABC (UK), 1979: exact same hardware as US version
diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp
index 1b5d309a7ac..4ad1c35182e 100644
--- a/src/mame/drivers/toypop.cpp
+++ b/src/mame/drivers/toypop.cpp
@@ -1,19 +1,10 @@
-// license:???
-// copyright-holders:Edgardo E. Contini Salvan
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
/****************************************
Libble Rabble (c) 1983 Namco
Toypop (c) 1986 Namco
-driver by Edgardo E. Contini Salvan (pag2806@iperbole.bologna.it)
-
-6809 main CPU,
-6809 sound and
-68000 to create the background image.
-
-Libble Rabble and Toypop run on the same board, but the memory map is subtly
-different.
-
Notes:
------
- Libble Rabble Easter egg:
@@ -24,621 +15,92 @@ Notes:
9xU 2xR 9xD 2xL
(c) 1983 NAMCO LTD. will appear on the screen.
-
-TODO:
-- I haven't found any Easter egg in Toy Pop. Maybe they had stopped inserting
- them by that time.
-
****************************************/
#include "emu.h"
-#include "cpu/m6809/m6809.h"
-#include "cpu/m68000/m68000.h"
-#include "includes/toypop.h"
-
-
-READ16_MEMBER(toypop_state::toypop_m68000_sharedram_r)
-{
- return m_m68000_sharedram[offset];
-}
-
-WRITE16_MEMBER(toypop_state::toypop_m68000_sharedram_w)
-{
- if (ACCESSING_BITS_0_7)
- {
- m_m68000_sharedram[offset] = data & 0xff;
- }
-}
-
-READ8_MEMBER(toypop_state::toypop_main_interrupt_enable_r)
-{
- m_main_irq_mask = 1;
- return 0;
-}
-
-WRITE8_MEMBER(toypop_state::toypop_main_interrupt_enable_w)
-{
- m_main_irq_mask = 1;
-}
-
-WRITE8_MEMBER(toypop_state::toypop_main_interrupt_disable_w)
-{
- m_main_irq_mask = 0;
-// m_maincpu->set_input_line(0, CLEAR_LINE);
-}
-
-WRITE8_MEMBER(toypop_state::toypop_sound_interrupt_enable_acknowledge_w)
-{
- m_sound_irq_mask = 1;
-// m_audiocpu->set_input_line(0, CLEAR_LINE);
-}
-
-WRITE8_MEMBER(toypop_state::toypop_sound_interrupt_disable_w)
-{
- m_sound_irq_mask = 0;
-}
-
-void toypop_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
-{
- switch (id)
- {
- case TIMER_NAMCOIO_RUN:
- namcoio_run(ptr, param);
- break;
- default:
- assert_always(FALSE, "Unknown id in toypop_state::device_timer");
- }
-}
-
-TIMER_CALLBACK_MEMBER(toypop_state::namcoio_run)
-{
- switch (param)
- {
- case 0:
- m_namco58xx->customio_run();
- break;
- case 1:
- m_namco56xx_1->customio_run();
- break;
- case 2:
- m_namco56xx_2->customio_run();
- break;
- }
-}
-
-INTERRUPT_GEN_MEMBER(toypop_state::toypop_main_vblank_irq)
-{
- if(m_main_irq_mask)
- device.execute().set_input_line(0, HOLD_LINE);
-
- if (!m_namco58xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */
- timer_set(attotime::from_usec(50), TIMER_NAMCOIO_RUN);
- if (!m_namco56xx_1->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */
- timer_set(attotime::from_usec(50), TIMER_NAMCOIO_RUN, 1);
- if (!m_namco56xx_2->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */
- timer_set(attotime::from_usec(50), TIMER_NAMCOIO_RUN, 2);
-}
-
-INTERRUPT_GEN_MEMBER(toypop_state::toypop_sound_timer_irq)
-{
- if(m_sound_irq_mask)
- device.execute().set_input_line(0, HOLD_LINE);
-}
-
-WRITE8_MEMBER(toypop_state::toypop_sound_clear_w)
-{
- m_audiocpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
-}
-
-WRITE8_MEMBER(toypop_state::toypop_sound_assert_w)
-{
- m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
-}
-
-WRITE8_MEMBER(toypop_state::toypop_m68000_clear_w)
+class toypop_state : public driver_device
{
- m_subcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
-}
-
-WRITE8_MEMBER(toypop_state::toypop_m68000_assert_w)
-{
- m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
-}
-
-void toypop_state::machine_reset()
-{
- m_main_irq_mask = 0;
- m_maincpu->set_input_line(0, CLEAR_LINE);
-
- m_sound_irq_mask = 0;
- m_audiocpu->set_input_line(0, CLEAR_LINE);
-
- m_interrupt_enable_68k = 0;
-}
-
-INTERRUPT_GEN_MEMBER(toypop_state::toypop_m68000_interrupt)
-{
- if (m_interrupt_enable_68k)
- device.execute().set_input_line(6, HOLD_LINE);
-}
-
-WRITE16_MEMBER(toypop_state::toypop_m68000_interrupt_enable_w)
-{
- m_interrupt_enable_68k = 1;
-}
-
-WRITE16_MEMBER(toypop_state::toypop_m68000_interrupt_disable_w)
-{
- m_interrupt_enable_68k = 0;
-}
-
-
-
-/*************************************
- *
- * Main CPU memory handlers
- *
- *************************************/
-
-static ADDRESS_MAP_START( liblrabl_map, AS_PROGRAM, 8, toypop_state )
- AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(toypop_videoram_w) AM_SHARE("videoram") /* video RAM */
- AM_RANGE(0x0800, 0x1fff) AM_RAM AM_SHARE("spriteram") /* general RAM, area 1 */
- AM_RANGE(0x2800, 0x2fff) AM_RAM AM_SHARE("m68k_shared") /* shared RAM with the 68000 CPU */
- AM_RANGE(0x6000, 0x63ff) AM_DEVREADWRITE("namco", namco_15xx_device, sharedram_r, sharedram_w) /* shared RAM with sound CPU */
- AM_RANGE(0x6800, 0x680f) AM_DEVREADWRITE("58xx", namco58xx_device, read, write) /* custom I/O */
- AM_RANGE(0x6810, 0x681f) AM_DEVREADWRITE("56xx_1", namco56xx_device, read, write) /* custom I/O */
- AM_RANGE(0x6820, 0x682f) AM_DEVREADWRITE("56xx_2", namco56xx_device, read, write) /* custom I/O */
- AM_RANGE(0x7000, 0x7000) AM_WRITE(toypop_main_interrupt_enable_w) /* enable interrupt */
- AM_RANGE(0x7800, 0x7800) AM_READ(watchdog_reset_r) AM_WRITE(toypop_main_interrupt_disable_w) /* disable interrupt */
- AM_RANGE(0x8000, 0x8000) AM_WRITE(toypop_m68000_clear_w) /* reset 68000 */
- AM_RANGE(0x8800, 0x8800) AM_WRITE(toypop_m68000_assert_w) /* reset 68000 */
- AM_RANGE(0x9000, 0x9000) AM_WRITE(toypop_sound_clear_w) /* sound CPU reset */
- AM_RANGE(0x9800, 0x9800) AM_WRITE(toypop_sound_assert_w) /* sound CPU reset */
- AM_RANGE(0xa000, 0xa001) AM_WRITE(toypop_palettebank_w) /* background image palette */
- AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM code */
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( toypop_map, AS_PROGRAM, 8, toypop_state )
- AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(toypop_videoram_w) AM_SHARE("videoram") /* video RAM */
- AM_RANGE(0x0800, 0x1fff) AM_RAM AM_SHARE("spriteram") /* general RAM, area 1 */
- AM_RANGE(0x2800, 0x2fff) AM_RAM AM_SHARE("m68k_shared") /* shared RAM with the 68000 CPU */
- AM_RANGE(0x6000, 0x600f) AM_DEVREADWRITE("58xx", namco58xx_device, read, write) /* custom I/O */
- AM_RANGE(0x6010, 0x601f) AM_DEVREADWRITE("56xx_1", namco56xx_device, read, write) /* custom I/O */
- AM_RANGE(0x6020, 0x602f) AM_DEVREADWRITE("56xx_2", namco56xx_device, read, write) /* custom I/O */
- AM_RANGE(0x6800, 0x6bff) AM_DEVREADWRITE("namco", namco_15xx_device, sharedram_r, sharedram_w) /* shared RAM with sound CPU */
- AM_RANGE(0x7000, 0x7000) AM_READWRITE(toypop_main_interrupt_enable_r, toypop_main_interrupt_disable_w) /* disable interrupt */
- AM_RANGE(0x8000, 0x8000) AM_WRITE(toypop_m68000_clear_w) /* reset 68000 */
- AM_RANGE(0x8800, 0x8800) AM_WRITE(toypop_m68000_assert_w) /* reset 68000 */
- AM_RANGE(0x9000, 0x9000) AM_WRITE(toypop_sound_clear_w) /* sound CPU reset */
- AM_RANGE(0x9800, 0x9800) AM_WRITE(toypop_sound_assert_w) /* sound CPU reset */
- AM_RANGE(0xa000, 0xa001) AM_WRITE(toypop_palettebank_w) /* background image palette */
- AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM code */
-ADDRESS_MAP_END
-
-
-/*************************************
- *
- * Sound CPU memory handlers
- *
- *************************************/
-
-static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, toypop_state )
- AM_RANGE(0x0000, 0x03ff) AM_DEVREADWRITE("namco", namco_15xx_device, sharedram_r, sharedram_w) /* shared RAM with the main CPU + sound registers */
- AM_RANGE(0x2000, 0x2000) AM_WRITE(toypop_sound_interrupt_disable_w) /* ??? toypop doesn't write here */
- AM_RANGE(0x4000, 0x4000) AM_WRITE(toypop_sound_interrupt_enable_acknowledge_w)
- AM_RANGE(0x6000, 0x6000) AM_WRITE(watchdog_reset_w)
- AM_RANGE(0xe000, 0xffff) AM_ROM
-ADDRESS_MAP_END
-
-
-
-/*************************************
- *
- * 68k CPU memory handlers
- *
- *************************************/
-
-static ADDRESS_MAP_START( m68k_map, AS_PROGRAM, 16, toypop_state )
- AM_RANGE(0x000000, 0x007fff) AM_ROM /* ROM code */
- AM_RANGE(0x080000, 0x0bffff) AM_RAM /* RAM */
- AM_RANGE(0x100000, 0x100fff) AM_READWRITE(toypop_m68000_sharedram_r, toypop_m68000_sharedram_w) /* shared RAM with the main CPU */
- AM_RANGE(0x180000, 0x187fff) AM_READWRITE(toypop_merged_background_r, toypop_merged_background_w) /* RAM that has to be merged with the background image */
- AM_RANGE(0x18fffc, 0x18ffff) AM_WRITE(toypop_flipscreen_w) /* flip mode */
- AM_RANGE(0x190000, 0x1dffff) AM_RAM AM_SHARE("bg_image") /* RAM containing the background image */
- AM_RANGE(0x300000, 0x300001) AM_WRITE(toypop_m68000_interrupt_enable_w) /* interrupt enable */
- AM_RANGE(0x380000, 0x380001) AM_WRITE(toypop_m68000_interrupt_disable_w)/* interrupt disable */
-ADDRESS_MAP_END
+public:
+ toypop_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ { }
+};
static INPUT_PORTS_START( liblrabl )
- /* The inputs are not memory mapped, they are handled by three I/O chips. */
- PORT_START("P1_RIGHT") /* 58XX #0 pins 22-29 */
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY
-
- PORT_START("P2_RIGHT") /* 58XX #0 pins 22-29 */
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY PORT_COCKTAIL
-
- PORT_START("P1_LEFT") /* 56XX #2 pins 22-29 */
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY
-
- PORT_START("P2_LEFT") /* 56XX #2 pins 22-29 */
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY PORT_COCKTAIL
-
- PORT_START("BUTTONS") /* 58XX #0 pins 30-33 and 38-41 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
-
- PORT_START("COINS") /* 58XX #0 pins 30-33 and 38-41 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
-
- PORT_START("DSW1") /* 56XX #1 pins 22-29 */
- /* default setting: all OFF */
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:8,7")
- PORT_DIPSETTING( 0x02, "1" )
- PORT_DIPSETTING( 0x00, "2" )
- PORT_DIPSETTING( 0x03, "3" )
- PORT_DIPSETTING( 0x01, "5" )
- PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWA:6,5,4")
- // bonus scores for common
- PORT_DIPSETTING( 0x1c, "40k 120k 200k 400k 600k 1m" )
- PORT_DIPSETTING( 0x0c, "40k 140k 250k 400k 700k 1m" )
- // bonus scores for 1, 2 or 3 lives
- PORT_DIPSETTING( 0x14, "50k 150k 300k 500k 700k 1m" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01)
- PORT_DIPSETTING( 0x04, "40k 120k and every 120k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01)
- PORT_DIPSETTING( 0x18, "40k 150k and every 150k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01)
- PORT_DIPSETTING( 0x08, "50k 150k 300k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01)
- PORT_DIPSETTING( 0x10, "40k 120k 200k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01)
- // bonus scores for 5 lives
- PORT_DIPSETTING( 0x14, "40k 120k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01)
- PORT_DIPSETTING( 0x04, "50k 150k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01)
- PORT_DIPSETTING( 0x18, "50k 150k and every 150k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01)
- PORT_DIPSETTING( 0x08, "60k 200k and every 200k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01)
- PORT_DIPSETTING( 0x10, "50k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01)
- // bonus scores for common
- PORT_DIPSETTING( 0x00, DEF_STR( None ) )
- PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:3,2,1")
- PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0xc0, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 3C_2C ) )
- PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x40, DEF_STR( 2C_3C ) )
- PORT_DIPSETTING( 0x60, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_6C ) )
-
- PORT_START("DSW2") /* 56XX #1 pins 30-33 and 38-41 */
- PORT_DIPNAME( 0x01, 0x01, "Freeze" ) PORT_DIPLOCATION("SWB:8")
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "Rack Test" ) PORT_DIPLOCATION("SWB:7")
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:6")
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWB:5,4")
- PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 1C_7C ) )
- PORT_DIPNAME( 0x20, 0x20, "Practice" ) PORT_DIPLOCATION("SWB:3")
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:2,1")
- PORT_DIPSETTING( 0xc0, "A" )
- PORT_DIPSETTING( 0x40, "B" )
- PORT_DIPSETTING( 0x80, "C" )
- PORT_DIPSETTING( 0x00, "D" )
-
- PORT_START("SERVICE") /* 56XX #2 pins 30-33 */
- PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_SERVICE( 0x08, IP_ACTIVE_LOW )
INPUT_PORTS_END
static INPUT_PORTS_START( toypop )
- /* The inputs are not memory mapped, they are handled by three I/O chips. */
- PORT_START("P1_RIGHT") /* 58XX #0 pins 22-29 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
-
- PORT_START("P2_RIGHT") /* 58XX #0 pins 22-29 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
-
- PORT_START("BUTTONS") /* 58XX #0 pins 30-33 and 38-41 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
-
- PORT_START("COINS") /* 58XX #0 pins 30-33 and 38-41 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
-
- PORT_START("DSW1") /* 56XX #1 pins 22-29 */
- /* default setting: all OFF */
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:8,7")
- PORT_DIPSETTING( 0x02, "1" )
- PORT_DIPSETTING( 0x01, "2" )
- PORT_DIPSETTING( 0x03, "3" )
- PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:6,5")
- PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
- PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:4,3")
- PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
- PORT_DIPNAME( 0x40, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWA:2")
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_SERVICE_DIPLOC( 0x80, 0x80, "SWA:1" )
-
- PORT_START("DSW2") /* 56XX #1 pins 30-33 and 38-41 */
- PORT_DIPNAME( 0x01, 0x01, "Freeze" ) PORT_DIPLOCATION("SWB:8")
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Level_Select ) ) PORT_DIPLOCATION("SWB:7")
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "2 Players Game" ) PORT_DIPLOCATION("SWB:6")
- PORT_DIPSETTING( 0x00, "1 Credit" )
- PORT_DIPSETTING( 0x04, "2 Credits" )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:5")
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "Entering" ) PORT_DIPLOCATION("SWB:4") // buy in
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:3,2")
- PORT_DIPSETTING( 0x40, DEF_STR( Easy ) )
- PORT_DIPSETTING( 0x60, DEF_STR( Normal ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Hard ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:1")
- PORT_DIPSETTING( 0x80, "Every 15000 points" )
- PORT_DIPSETTING( 0x00, "Every 20000 points" )
-
- PORT_START("P1_LEFT") /* 56XX #2 pins 22-29 */
- PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_START("P2_LEFT") /* 56XX #2 pins 22-29 */
- PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_START("SERVICE") /* 56XX #2 pins 30-33 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) // would be Cabinet, but this game has no cocktail mode
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) // service mode again
INPUT_PORTS_END
-
-static const gfx_layout charlayout =
-{
- 8,8,
- RGN_FRAC(1,1),
- 2,
- { 0, 4 },
- { 8*8+0, 8*8+1, 8*8+2, 8*8+3, 0, 1, 2, 3 },
- { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
- 16*8
-};
-
-static const gfx_layout spritelayout =
-{
- 16,16,
- RGN_FRAC(1,1),
- 2,
- { 0, 4 },
- { 0, 1, 2, 3, 8*8, 8*8+1, 8*8+2, 8*8+3, 16*8+0, 16*8+1, 16*8+2, 16*8+3,
- 24*8+0, 24*8+1, 24*8+2, 24*8+3 },
- { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
- 32 * 8, 33 * 8, 34 * 8, 35 * 8, 36 * 8, 37 * 8, 38 * 8, 39 * 8 },
- 64*8
-};
-
-static GFXDECODE_START( toypop )
- GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 128 )
- GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 128*4, 64 )
-GFXDECODE_END
-
-/***************************************************************************
-
- Custom I/O initialization
-
-***************************************************************************/
-
-READ8_MEMBER(toypop_state::dipA_l){ return ioport("DSW1")->read(); } // dips A
-READ8_MEMBER(toypop_state::dipA_h){ return ioport("DSW1")->read() >> 4; } // dips A
-READ8_MEMBER(toypop_state::dipB_l){ return ioport("DSW2")->read(); } // dips B
-READ8_MEMBER(toypop_state::dipB_h){ return ioport("DSW2")->read() >> 4; } // dips B
-
-WRITE8_MEMBER(toypop_state::out_coin0)
-{
- machine().bookkeeping().coin_lockout_global_w(data & 4);
- machine().bookkeeping().coin_counter_w(0, ~data & 8);
-}
-
-WRITE8_MEMBER(toypop_state::out_coin1)
-{
- machine().bookkeeping().coin_counter_w(1, ~data & 1);
-}
-
-WRITE8_MEMBER(toypop_state::flip)
-{
- flip_screen_set(data & 1);
-}
-
static MACHINE_CONFIG_START( liblrabl, toypop_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", M6809, 1536000) /* 1.536 MHz (measured on Libble Rabble board) */
- MCFG_CPU_PROGRAM_MAP(liblrabl_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, toypop_main_vblank_irq)
-
- MCFG_CPU_ADD("audiocpu", M6809, 1536000)
- MCFG_CPU_PROGRAM_MAP(sound_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, toypop_sound_timer_irq)
-
- MCFG_CPU_ADD("sub", M68000, 6144000) /* 6.144 MHz (measured on Libble Rabble board) */
- MCFG_CPU_PROGRAM_MAP(m68k_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, toypop_m68000_interrupt)
-
- MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
- /* synchronization of the CPUs */
-
- MCFG_DEVICE_ADD("58xx", NAMCO58XX, 0)
- MCFG_NAMCO58XX_IN_0_CB(IOPORT("COINS"))
- MCFG_NAMCO58XX_IN_1_CB(IOPORT("P1_RIGHT"))
- MCFG_NAMCO58XX_IN_2_CB(IOPORT("P2_RIGHT"))
- MCFG_NAMCO58XX_IN_3_CB(IOPORT("BUTTONS"))
-
- MCFG_DEVICE_ADD("56xx_1", NAMCO56XX, 0)
- MCFG_NAMCO56XX_IN_0_CB(READ8(toypop_state, dipA_h))
- MCFG_NAMCO56XX_IN_1_CB(READ8(toypop_state, dipB_l))
- MCFG_NAMCO56XX_IN_2_CB(READ8(toypop_state, dipB_h))
- MCFG_NAMCO56XX_IN_3_CB(READ8(toypop_state, dipA_l))
- MCFG_NAMCO56XX_OUT_0_CB(WRITE8(toypop_state, flip))
-
- MCFG_DEVICE_ADD("56xx_2", NAMCO56XX, 0)
- MCFG_NAMCO56XX_IN_1_CB(IOPORT("P1_LEFT"))
- MCFG_NAMCO56XX_IN_2_CB(IOPORT("P2_LEFT"))
- MCFG_NAMCO56XX_IN_3_CB(IOPORT("SERVICE"))
-
- /* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60.606060)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(36*8, 28*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(toypop_state, screen_update_toypop)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", toypop)
- MCFG_PALETTE_ADD("palette", 128*4+64*4+16*2)
- MCFG_PALETTE_INDIRECT_ENTRIES(256)
- MCFG_PALETTE_INIT_OWNER(toypop_state, toypop)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD("namco", NAMCO_15XX, 24000)
- MCFG_NAMCO_AUDIO_VOICES(8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( toypop, liblrabl )
-
- /* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(toypop_map)
-
- MCFG_DEVICE_MODIFY("58xx")
- MCFG_NAMCO58XX_OUT_0_CB(WRITE8(toypop_state, out_coin0))
- MCFG_NAMCO58XX_OUT_1_CB(WRITE8(toypop_state, out_coin1))
MACHINE_CONFIG_END
-
-/*************************************
- *
- * ROM definitions
- *
- *************************************/
-
ROM_START( liblrabl )
- ROM_REGION( 0x10000, "maincpu", 0 ) /* 64k for the first CPU */
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "5b.rom", 0x8000, 0x4000, CRC(da7a93c2) SHA1(fe4a02cdab66722eb7b8cf58825f899b1949a6a2) )
ROM_LOAD( "5c.rom", 0xc000, 0x4000, CRC(6cae25dc) SHA1(de74317a7d5de1865d096c377923a764be5e6879) )
- ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the second CPU */
+ ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "2c.rom", 0xe000, 0x2000, CRC(7c09e50a) SHA1(5f004d60bbb7355e008a9cda137b28bc2192b8ef) )
- ROM_REGION( 0x8000, "sub", 0 ) /* 32k for the third CPU */
+ ROM_REGION( 0x8000, "sub", 0 )
ROM_LOAD16_BYTE( "8c.rom", 0x0000, 0x4000, CRC(a00cd959) SHA1(cc5621103c31cfbc65941615cab391db0f74e6ce) )
ROM_LOAD16_BYTE("10c.rom", 0x0001, 0x4000, CRC(09ce209b) SHA1(2ed46d6592f8227bac8ab54963d9a300706ade47) )
- /* temporary space for graphics (disposed after conversion) */
ROM_REGION( 0x2000, "gfx1", 0 )
- ROM_LOAD( "5p.rom", 0x0000, 0x2000, CRC(3b4937f0) SHA1(06d9de576f1c2262c34aeb91054e68c9298af688) ) /* characters */
+ ROM_LOAD( "5p.rom", 0x0000, 0x2000, CRC(3b4937f0) SHA1(06d9de576f1c2262c34aeb91054e68c9298af688) )
ROM_REGION( 0x4000, "gfx2", 0 )
- ROM_LOAD( "9t.rom", 0x0000, 0x4000, CRC(a88e24ca) SHA1(eada133579f19de09255084dcdc386311606a335) ) /* sprites */
+ ROM_LOAD( "9t.rom", 0x0000, 0x4000, CRC(a88e24ca) SHA1(eada133579f19de09255084dcdc386311606a335) )
- ROM_REGION( 0x0600, "proms", 0 ) /* color proms */
- ROM_LOAD( "lr1-3.1r", 0x0000, 0x0100, CRC(f3ec0d07) SHA1(b0aad1fb6df79f202889600f486853995352f9c2) ) // palette: red component
- ROM_LOAD( "lr1-2.1s", 0x0100, 0x0100, CRC(2ae4f702) SHA1(838fdca9e91fea4f64a59880ac47c48973bb8fbf) ) // palette: green component
- ROM_LOAD( "lr1-1.1t", 0x0200, 0x0100, CRC(7601f208) SHA1(572d070ca387b780030ed5de38a8970b7cc14349) ) // palette: blue component
- ROM_LOAD( "lr1-5.5l", 0x0300, 0x0100, CRC(940f5397) SHA1(825a7bd78a8a08d30bad2e4890ae6e9ad88b36b8) ) /* characters */
- ROM_LOAD( "lr1-6.2p", 0x0400, 0x0200, CRC(a6b7f850) SHA1(7cfde16dfd5c4d5b876b4fbe4f924f1385932a93) ) /* sprites */
+ ROM_REGION( 0x0600, "proms", 0 )
+ ROM_LOAD( "lr1-3.1r", 0x0000, 0x0100, CRC(f3ec0d07) SHA1(b0aad1fb6df79f202889600f486853995352f9c2) )
+ ROM_LOAD( "lr1-2.1s", 0x0100, 0x0100, CRC(2ae4f702) SHA1(838fdca9e91fea4f64a59880ac47c48973bb8fbf) )
+ ROM_LOAD( "lr1-1.1t", 0x0200, 0x0100, CRC(7601f208) SHA1(572d070ca387b780030ed5de38a8970b7cc14349) )
+ ROM_LOAD( "lr1-5.5l", 0x0300, 0x0100, CRC(940f5397) SHA1(825a7bd78a8a08d30bad2e4890ae6e9ad88b36b8) )
+ ROM_LOAD( "lr1-6.2p", 0x0400, 0x0200, CRC(a6b7f850) SHA1(7cfde16dfd5c4d5b876b4fbe4f924f1385932a93) )
- ROM_REGION( 0x0100, "namco", 0 ) /* sound prom */
+ ROM_REGION( 0x0100, "namco", 0 )
ROM_LOAD( "lr1-4.3d", 0x0000, 0x0100, CRC(16a9166a) SHA1(847cbaf7c88616576c410177e066ae1d792ac0ba) )
ROM_END
ROM_START( toypop )
- ROM_REGION( 0x10000, "maincpu", 0 ) /* 64k for the first CPU */
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "tp1-2.5b", 0x8000, 0x4000, CRC(87469620) SHA1(2ee257486c9c044386ac7d0cd4a90583eaeb3e97) )
ROM_LOAD( "tp1-1.5c", 0xc000, 0x4000, CRC(dee2fd6e) SHA1(b2c12008d6d3e7544ba3c12a52a6abf9181842c8) )
- ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the second CPU */
+ ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "tp1-3.2c", 0xe000, 0x2000, CRC(5f3bf6e2) SHA1(d1b3335661b9b23cb10001416c515b77b5e783e9) )
- ROM_REGION( 0x8000, "sub", 0 ) /* 32k for the third CPU */
+ ROM_REGION( 0x8000, "sub", 0 )
ROM_LOAD16_BYTE( "tp1-4.8c", 0x0000, 0x4000, CRC(76997db3) SHA1(5023a2f20a5f2c9baff130f6832583493c71f883) )
ROM_LOAD16_BYTE("tp1-5.10c", 0x0001, 0x4000, CRC(37de8786) SHA1(710365e34c05d01815844c414518f93234b6160b) )
- /* temporary space for graphics (disposed after conversion) */
ROM_REGION( 0x2000, "gfx1", 0 )
- ROM_LOAD( "tp1-7.5p", 0x0000, 0x2000, CRC(95076f9e) SHA1(1e3d32b21f6d46591ec3921aba51f672d64a9023) ) /* characters */
+ ROM_LOAD( "tp1-7.5p", 0x0000, 0x2000, CRC(95076f9e) SHA1(1e3d32b21f6d46591ec3921aba51f672d64a9023) )
ROM_REGION( 0x4000, "gfx2", 0 )
- ROM_LOAD( "tp1-6.9t", 0x0000, 0x4000, CRC(481ffeaf) SHA1(c51735ad3a1dbb46ad414408b54554e9223b2219) ) /* sprites */
+ ROM_LOAD( "tp1-6.9t", 0x0000, 0x4000, CRC(481ffeaf) SHA1(c51735ad3a1dbb46ad414408b54554e9223b2219) )
- ROM_REGION( 0x0600, "proms", 0 ) /* color proms */
- ROM_LOAD( "tp1-3.1r", 0x0000, 0x0100, CRC(cfce2fa5) SHA1(b42aa0f34d885389d2650bf7a0531b95703b8a28) ) // palette: red component
- ROM_LOAD( "tp1-2.1s", 0x0100, 0x0100, CRC(aeaf039d) SHA1(574560526100d38635aecd71eb73499c4f57d586) ) // palette: green component
- ROM_LOAD( "tp1-1.1t", 0x0200, 0x0100, CRC(08e7cde3) SHA1(5261aca6834d635d17f8afaa8e35848930030ba4) ) // palette: blue component
- ROM_LOAD( "tp1-4.5l", 0x0300, 0x0100, CRC(74138973) SHA1(2e21dbb1b19dd089da52e70fcb0ca91336e004e6) ) /* characters */
- ROM_LOAD( "tp1-5.2p", 0x0400, 0x0200, CRC(4d77fa5a) SHA1(2438910314b23ecafb553230244f3931861ad2da) ) /* sprites */
+ ROM_REGION( 0x0600, "proms", 0 )
+ ROM_LOAD( "tp1-3.1r", 0x0000, 0x0100, CRC(cfce2fa5) SHA1(b42aa0f34d885389d2650bf7a0531b95703b8a28) )
+ ROM_LOAD( "tp1-2.1s", 0x0100, 0x0100, CRC(aeaf039d) SHA1(574560526100d38635aecd71eb73499c4f57d586) )
+ ROM_LOAD( "tp1-1.1t", 0x0200, 0x0100, CRC(08e7cde3) SHA1(5261aca6834d635d17f8afaa8e35848930030ba4) )
+ ROM_LOAD( "tp1-4.5l", 0x0300, 0x0100, CRC(74138973) SHA1(2e21dbb1b19dd089da52e70fcb0ca91336e004e6) )
+ ROM_LOAD( "tp1-5.2p", 0x0400, 0x0200, CRC(4d77fa5a) SHA1(2438910314b23ecafb553230244f3931861ad2da) )
- ROM_REGION( 0x0100, "namco", 0 ) /* sound prom */
+ ROM_REGION( 0x0100, "namco", 0 )
ROM_LOAD( "tp1-6.3d", 0x0000, 0x0100, CRC(16a9166a) SHA1(847cbaf7c88616576c410177e066ae1d792ac0ba) )
ROM_END
-// YEAR, NAME, PARENT,MACHINE, INPUT, INIT,MONITOR,COMPANY,FULLNAME,FLAGS
-GAME( 1983, liblrabl, 0, liblrabl, liblrabl, driver_device, 0, ROT0, "Namco", "Libble Rabble", 0 )
-GAME( 1986, toypop, 0, toypop, toypop, driver_device, 0, ROT0, "Namco", "Toypop", 0 )
+GAME( 1983, liblrabl, 0, liblrabl, liblrabl, driver_device, 0, ROT0, "Namco", "Libble Rabble", MACHINE_IS_SKELETON )
+GAME( 1986, toypop, 0, toypop, toypop, driver_device, 0, ROT0, "Namco", "Toypop", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/trackfld.cpp b/src/mame/drivers/trackfld.cpp
index c898f8d4bde..4f8a41ef80a 100644
--- a/src/mame/drivers/trackfld.cpp
+++ b/src/mame/drivers/trackfld.cpp
@@ -1266,6 +1266,52 @@ ROM_START( hyprolymba )
ROM_LOAD( "pal16l8.e6", 0x0200, 0x0104, CRC(122f23e6) SHA1(d178510843a46f043ecafaa44d95bb590ad67fb0) )
ROM_END
+ROM_START( hipoly )
+ /* These ROM's are located on the CPU/Video Board */
+ ROM_REGION( 0x10000, "maincpu", 0 ) /* 64k for code + 64k for decrypted opcodes */
+ ROM_LOAD( "2.1a", 0x6000, 0x2000, CRC(82257fb7) SHA1(4a5038292e582d5c3b5f2d82b01c57ccb24f3095) ) // only one byte of difference with hyprolymba
+ ROM_LOAD( "2.2a", 0x8000, 0x2000, CRC(15b83099) SHA1(79827590d74f20c9a95723e06b05af2b15c34f5f) ) // ok
+ ROM_LOAD( "2.4a", 0xa000, 0x2000, CRC(93a32a97) SHA1(4fbb2fcdf9bc7a3d273dbc27b8157f163ff9bf11) ) // too different... maybe a bad dump?
+ ROM_LOAD( "2.5a", 0xc000, 0x2000, CRC(d099b1e8) SHA1(0472991ad6caef41ec6b8ec8bf3d9d07584a57cc) ) // ok
+ ROM_LOAD( "2.7a", 0xe000, 0x2000, CRC(974ff815) SHA1(11512df2008a79ba44bbb84bd70885f187113211) ) // ok
+
+ /* These ROM's are located on the Sound Board */
+ ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_LOAD( "1.2c", 0x0000, 0x2000, CRC(95bf79b6) SHA1(ea9135acd7ad162c19c5cdde356e69792d61b675) )
+
+ /* These ROM's are located on the Sound Board */
+ ROM_REGION( 0x10000, "adpcm", 0 ) /* 64k for the 6802 which plays ADPCM samples */
+ ROM_LOAD( "1.11d", 0x8000, 0x2000, CRC(102d3a78) SHA1(0587e87c579f6d333fb1793d20eb7a3c769fbd11) )
+ ROM_LOAD( "1.10d", 0xa000, 0x2000, CRC(e9919365) SHA1(bd11d6e3ee2c6e698159c2768e315389d666107f) )
+ ROM_LOAD( "1.11c", 0xc000, 0x2000, CRC(c3ec42e1) SHA1(048a95726c4f031552e629c3788952c1bc5e7251) )
+ ROM_LOAD( "1.10c", 0xe000, 0x2000, CRC(76998389) SHA1(499189b0e20296af88712199b93b958655083608) )
+
+ /* These ROM's are located on the CPU/Video Board */
+ ROM_REGION( 0x8000, "gfx1", 0 )
+ ROM_LOAD( "2.18a", 0x0000, 0x2000, CRC(8d28864f) SHA1(b6827592095543c92384a7e8b817a741d249cff8) )
+ ROM_LOAD( "2.19a", 0x2000, 0x2000, CRC(800ff1f1) SHA1(33d73b18903e3e6bfb30f1a06db4b8105d4040d8) )
+ ROM_LOAD( "2.21a", 0x4000, 0x2000, CRC(d9faf183) SHA1(4448b6242790783d37acf50704d597af5878c2ab) )
+ ROM_LOAD( "2.22a", 0x6000, 0x2000, CRC(5886c802) SHA1(884a12a8f63600da4f23b29be6dbaacef37add20) )
+
+ /* These ROM's are located on the CPU/Video Board */
+ ROM_REGION( 0x6000, "gfx2", 0 )
+ ROM_LOAD( "2.22h", 0x0000, 0x2000, CRC(6c107a9c) SHA1(139e99b126aad16223573ef987adc94d96d17857) )
+ ROM_LOAD( "2.21h", 0x2000, 0x2000, CRC(21847e56) SHA1(dcc4f6e85e7125a6dfa2de9874f6adf8382e019c) )
+ ROM_LOAD( "2.19h", 0x4000, 0x2000, CRC(c2166a5c) SHA1(5ba25900e653ce4edcf35f1fbce758a327a715ce) )
+
+ /* These PROM's are located on the CPU/Video Board, borrowed from other sets */
+ ROM_REGION( 0x0220, "proms", 0 )
+ ROM_LOAD( "361b16.e1", 0x0000, 0x0020, CRC(d55f30b5) SHA1(4d6a851f4886778307f75771645078b97ad55f5f) ) /* palette */
+ ROM_LOAD( "361b17.b15", 0x0020, 0x0100, CRC(d2ba4d32) SHA1(894b5cedf01ba9225a0d6215291857e455b84903) ) /* sprite lookup table */
+ ROM_LOAD( "361b18.f22", 0x0120, 0x0100, CRC(053e5861) SHA1(6740a62cf7b6938a4f936a2fed429704612060a5) ) /* char lookup table */
+
+ /* These PAL's are located on the CPU/Video Board */
+ ROM_REGION( 0x0400, "plds", 0 )
+ ROM_LOAD( "pal16l8.e4", 0x0000, 0x0104, NO_DUMP )
+ ROM_LOAD( "pal16l8.e6", 0x0200, 0x0104, NO_DUMP )
+ROM_END
+
+
ROM_START( atlantol )
ROM_REGION( 0x10000, "maincpu", 0 ) /* 64k for code + 64k for decrypted opcodes */
ROM_LOAD( "atl37", 0x00000, 0x10000, CRC(aca8da51) SHA1(50e96fd8496ed32e11eb43bcbfd468ce566caa47) )
@@ -1556,6 +1602,7 @@ GAME( 1983, trackfldc, trackfld, trackfld, trackfld, trackfld_state, trackfld, R
GAME( 1983, hyprolym, trackfld, trackfld, trackfld, trackfld_state, trackfld, ROT0, "Konami", "Hyper Olympic", MACHINE_SUPPORTS_SAVE )
GAME( 1983, hyprolymb, trackfld, hyprolyb, trackfld, trackfld_state, trackfld, ROT0, "bootleg", "Hyper Olympic (bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1983, hyprolymba,trackfld, hyprolyb, trackfld, trackfld_state, trackfld, ROT0, "bootleg", "Hyper Olympic (bootleg, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1983, hipoly, trackfld, hyprolyb, trackfld, trackfld_state, trackfld, ROT0, "bootleg", "Hipoly (bootleg of Hyper Olympic)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
GAME( 1996, atlantol, trackfld, atlantol, atlantol, trackfld_state, atlantol, ROT0, "bootleg", "Atlant Olimpic", MACHINE_SUPPORTS_SAVE )
GAME( 1982, trackfldnz,trackfld, trackfld, trackfld, trackfld_state, trackfldnz,ROT0, "bootleg? (Goldberg Enterprizes Inc.)", "Track & Field (NZ bootleg?)", MACHINE_SUPPORTS_SAVE) // bootleg of the Centuri version
diff --git a/src/mame/drivers/tsamurai.cpp b/src/mame/drivers/tsamurai.cpp
index cf80d064683..7cd2d5de543 100644
--- a/src/mame/drivers/tsamurai.cpp
+++ b/src/mame/drivers/tsamurai.cpp
@@ -6,6 +6,8 @@
TODO:
- colors for this HW are a complete mystery and probably needs HW tests.
+ - vsgongf sets 0 as player color in work RAM 0xc502 and it's never ever
+ set up properly. Assume protection related issue.
driver by Phil Stroffolino
@@ -1264,7 +1266,7 @@ ROM_START( ringfgt2 )
ROM_LOAD( "clr.6p", 0x200, 0x0100, CRC(0e4fd17a) SHA1(d4e32bd9dd903177af61f77976a25c5db1467bba) )
ROM_END
-GAME( 1984, vsgongf, 0, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko", "VS Gong Fight", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE )
+GAME( 1984, vsgongf, 0, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko", "VS Gong Fight", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION )
GAME( 1984, ringfgt, vsgongf, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 1)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE )
GAME( 1984, ringfgt2, vsgongf, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 2)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/wacky_gator.cpp b/src/mame/drivers/wacky_gator.cpp
index 77f67d7165e..bd86cd9cd4f 100644
--- a/src/mame/drivers/wacky_gator.cpp
+++ b/src/mame/drivers/wacky_gator.cpp
@@ -1,4 +1,4 @@
-// license:GPL2+
+// license:GPL-2.0+
// copyright-holders:FelipeSanches, Sandro Ronco
//
// Wacky Gator
diff --git a/src/mame/drivers/yiear.cpp b/src/mame/drivers/yiear.cpp
index 18beaa4ca3e..444a644dfab 100644
--- a/src/mame/drivers/yiear.cpp
+++ b/src/mame/drivers/yiear.cpp
@@ -1,9 +1,9 @@
-// license:???
-// copyright-holders:Enrique Sanchez
+// license:BSD-3-Clause
+// copyright-holders:Phil Stroffolino
+// thanks-to:Enrique Sanchez
/***************************************************************************
Yie Ar Kung-Fu memory map (preliminary)
- enrique.sanchez@cs.us.es
CPU: Motorola 6809
diff --git a/src/mame/drivers/zapcomputer.cpp b/src/mame/drivers/zapcomputer.cpp
index f6dab84cc73..b876fcaf555 100644
--- a/src/mame/drivers/zapcomputer.cpp
+++ b/src/mame/drivers/zapcomputer.cpp
@@ -1,4 +1,4 @@
-// license:GPL2+
+// license:GPL-2.0+
// copyright-holders:FelipeSanches
/*
ZAP - Z80 Applications Processor
diff --git a/src/mame/includes/aerofgt.h b/src/mame/includes/aerofgt.h
index 194640f805c..a5b8583791e 100644
--- a/src/mame/includes/aerofgt.h
+++ b/src/mame/includes/aerofgt.h
@@ -107,6 +107,7 @@ public:
DECLARE_VIDEO_START(spinlbrk);
DECLARE_VIDEO_START(turbofrc);
DECLARE_VIDEO_START(wbbc97);
+ DECLARE_DRIVER_INIT(banked_oki);
UINT32 screen_update_pspikes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_spikes91(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_pspikesb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/includes/badlands.h b/src/mame/includes/badlands.h
index a23ec09a2c3..fe4e9a68e6d 100644
--- a/src/mame/includes/badlands.h
+++ b/src/mame/includes/badlands.h
@@ -26,11 +26,8 @@ public:
required_device<atari_motion_objects_device> m_mob;
UINT8 m_pedal_value[2];
-
- UINT8 * m_bank_base;
- UINT8 * m_bank_source_data;
-
UINT8 m_playfield_tile_bank;
+
virtual void update_interrupts() override;
virtual void scanline_update(screen_device &screen, int scanline) override;
DECLARE_READ16_MEMBER(sound_busy_r);
diff --git a/src/mame/includes/bking.h b/src/mame/includes/bking.h
index ffd455d3421..c6776381cb0 100644
--- a/src/mame/includes/bking.h
+++ b/src/mame/includes/bking.h
@@ -1,5 +1,5 @@
-// license:???
-// copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari
+// license:BSD-3-Clause
+// copyright-holders:Mike Balfour, Zsolt Vasvari
#include "machine/buggychl.h"
class bking_state : public driver_device
diff --git a/src/mame/includes/carjmbre.h b/src/mame/includes/carjmbre.h
deleted file mode 100644
index e19917b9f43..00000000000
--- a/src/mame/includes/carjmbre.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// license:???
-// copyright-holders:insideoutboy, Nicola Salmoria
-/***************************************************************************
-
- Car Jamboree
-
-***************************************************************************/
-
-class carjmbre_state : public driver_device
-{
-public:
- carjmbre_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_videoram(*this, "videoram"),
- m_spriteram(*this, "spriteram"),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
-
- /* memory pointers */
- required_shared_ptr<UINT8> m_videoram;
- required_shared_ptr<UINT8> m_spriteram;
-
- /* video-related */
- tilemap_t *m_cj_tilemap;
- UINT8 m_flipscreen;
- UINT16 m_bgcolor;
-
- UINT8 m_nmi_mask;
- DECLARE_WRITE8_MEMBER(nmi_mask_w);
- DECLARE_WRITE8_MEMBER(carjmbre_flipscreen_w);
- DECLARE_WRITE8_MEMBER(carjmbre_bgcolor_w);
- DECLARE_WRITE8_MEMBER(carjmbre_8806_w);
- DECLARE_WRITE8_MEMBER(carjmbre_videoram_w);
- TILE_GET_INFO_MEMBER(get_carjmbre_tile_info);
- virtual void machine_reset() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(carjmbre);
- UINT32 screen_update_carjmbre(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(vblank_irq);
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
-};
diff --git a/src/mame/includes/flower.h b/src/mame/includes/flower.h
deleted file mode 100644
index cc2ff96ced2..00000000000
--- a/src/mame/includes/flower.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// license:???
-// copyright-holders:insideoutboy, David Haywood, Stephh
-class flower_state : public driver_device
-{
-public:
- flower_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_sn_nmi_enable(*this, "sn_nmi_enable"),
- m_spriteram(*this, "spriteram"),
- m_textram(*this, "textram"),
- m_bg0ram(*this, "bg0ram"),
- m_bg1ram(*this, "bg1ram"),
- m_bg0_scroll(*this, "bg0_scroll"),
- m_bg1_scroll(*this, "bg1_scroll"),
- m_maincpu(*this, "maincpu"),
- m_audiocpu(*this, "audiocpu"),
- m_subcpu(*this, "subcpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
-
- required_shared_ptr<UINT8> m_sn_nmi_enable;
- required_shared_ptr<UINT8> m_spriteram;
- required_shared_ptr<UINT8> m_textram;
- required_shared_ptr<UINT8> m_bg0ram;
- required_shared_ptr<UINT8> m_bg1ram;
- required_shared_ptr<UINT8> m_bg0_scroll;
- required_shared_ptr<UINT8> m_bg1_scroll;
- tilemap_t *m_bg0_tilemap;
- tilemap_t *m_bg1_tilemap;
- tilemap_t *m_text_tilemap;
- tilemap_t *m_text_right_tilemap;
- DECLARE_WRITE8_MEMBER(flower_maincpu_irq_ack);
- DECLARE_WRITE8_MEMBER(flower_subcpu_irq_ack);
- DECLARE_WRITE8_MEMBER(flower_soundcpu_irq_ack);
- DECLARE_WRITE8_MEMBER(flower_coin_counter_w);
- DECLARE_WRITE8_MEMBER(flower_coin_lockout_w);
- DECLARE_WRITE8_MEMBER(sound_command_w);
- DECLARE_WRITE8_MEMBER(flower_textram_w);
- DECLARE_WRITE8_MEMBER(flower_bg0ram_w);
- DECLARE_WRITE8_MEMBER(flower_bg1ram_w);
- DECLARE_WRITE8_MEMBER(flower_flipscreen_w);
- DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
- TILE_GET_INFO_MEMBER(get_bg0_tile_info);
- TILE_GET_INFO_MEMBER(get_bg1_tile_info);
- TILE_GET_INFO_MEMBER(get_text_tile_info);
- virtual void video_start() override;
- UINT32 screen_update_flower(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
- required_device<cpu_device> m_subcpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
-};
-
-
-// ======================> flower_sound_device
-
-
-/* this structure defines the parameters for a channel */
-struct flower_sound_channel
-{
- UINT32 start;
- UINT32 pos;
- UINT16 freq;
- UINT8 volume;
- UINT8 voltab;
- UINT8 oneshot;
- UINT8 active;
- UINT8 effect;
- UINT32 ecount;
-
-};
-
-class flower_sound_device : public device_t,
- public device_sound_interface
-{
-public:
- flower_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- ~flower_sound_device() {}
-
- enum
- {
- TIMER_CLOCK_EFFECT
- };
-
- DECLARE_WRITE8_MEMBER( sound1_w );
- DECLARE_WRITE8_MEMBER( sound2_w );
-
-protected:
- // device-level overrides
- virtual void device_config_complete() override;
- virtual void device_start() override;
- virtual void device_reset() override;
-
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-
- // sound stream update overrides
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
-
-private:
- void make_mixer_table(int voices, int gain);
-
- // internal state
- emu_timer *m_effect_timer;
-
- /* data about the sound system */
- flower_sound_channel m_channel_list[8];
- flower_sound_channel *m_last_channel;
-
- /* global sound parameters */
- const UINT8 *m_sample_rom;
- const UINT8 *m_volume_rom;
- sound_stream * m_stream;
-
- /* mixer tables and internal buffers */
- std::unique_ptr<INT16[]> m_mixer_table;
- INT16 *m_mixer_lookup;
- std::unique_ptr<short[]> m_mixer_buffer;
-
- UINT8 m_soundregs1[0x40];
- UINT8 m_soundregs2[0x40];
-
-};
-
-extern const device_type FLOWER;
diff --git a/src/mame/includes/galastrm.h b/src/mame/includes/galastrm.h
index c2413a6d11d..b62d797cdc1 100644
--- a/src/mame/includes/galastrm.h
+++ b/src/mame/includes/galastrm.h
@@ -1,4 +1,4 @@
-// license:???
+// license:BSD-3-Clause
// copyright-holders:Hau
#include "machine/eepromser.h"
diff --git a/src/mame/includes/genpc.h b/src/mame/includes/genpc.h
index b3353de35d6..13f00e8eac2 100644
--- a/src/mame/includes/genpc.h
+++ b/src/mame/includes/genpc.h
@@ -36,12 +36,12 @@ public:
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
virtual ioport_constructor device_input_ports() const override;
+
+ DECLARE_ADDRESS_MAP(map, 8);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
-
- void install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler);
public:
required_device<cpu_device> m_maincpu;
required_device<pic8259_device> m_pic8259;
@@ -76,12 +76,12 @@ public:
UINT8 m_ppi_shift_enable;
// interface to the keyboard
- virtual DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
+ DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
DECLARE_WRITE_LINE_MEMBER( keyboard_data_w );
- virtual DECLARE_READ8_MEMBER ( pc_ppi_porta_r );
- virtual DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
- virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
+ DECLARE_READ8_MEMBER ( pc_ppi_porta_r );
+ DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
+ DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out1_changed );
DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out2_changed );
@@ -104,7 +104,6 @@ public:
DECLARE_WRITE_LINE_MEMBER( pc_speaker_set_spkrdata );
- DECLARE_READ8_MEMBER(pc_page_r);
DECLARE_WRITE8_MEMBER(pc_page_w);
DECLARE_WRITE8_MEMBER(nmi_enable_w);
@@ -133,18 +132,16 @@ public:
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
- virtual DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ) override;
+ DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
protected:
// device-level overrides
- virtual void device_start() override;
- virtual void device_reset() override;
required_device<cassette_image_device> m_cassette;
public:
- virtual DECLARE_READ8_MEMBER ( pc_ppi_porta_r ) override;
- virtual DECLARE_READ8_MEMBER ( pc_ppi_portc_r ) override;
- virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ) override;
+ DECLARE_READ8_MEMBER ( pc_ppi_porta_r );
+ DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
+ DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
};
@@ -165,17 +162,13 @@ public:
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
virtual ioport_constructor device_input_ports() const override;
-
-protected:
- // device-level overrides
virtual void device_start() override;
- virtual void device_reset() override;
public:
- virtual DECLARE_READ8_MEMBER ( pc_ppi_portc_r ) override;
- virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ) override;
+ DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
+ DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
- virtual DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ) override;
+ DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
};
extern const device_type EC1841_MOTHERBOARD;
@@ -190,11 +183,11 @@ public:
// construction/destruction
pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ DECLARE_ADDRESS_MAP(map, 8);
+
virtual machine_config_constructor device_mconfig_additions() const override;
virtual ioport_constructor device_input_ports() const override;
protected:
- // device-level overrides
- void device_start() override;
};
extern const device_type PCNOPPI_MOTHERBOARD;
diff --git a/src/mame/includes/mboard.h b/src/mame/includes/mboard.h
deleted file mode 100644
index b6e8c5028f4..00000000000
--- a/src/mame/includes/mboard.h
+++ /dev/null
@@ -1,122 +0,0 @@
-// license:???
-// copyright-holders:Ralf Schaefer, Cowering
-/**********************************************************************
-
- Mephisto Chess Computers
-
-**********************************************************************/
-
-#ifndef __MBOARD_H__
-#define __MBOARD_H__
-
-/***************************************************************************
- MACROS
-***************************************************************************/
-
-enum
-{
- EM, /*No piece*/
- BP,
- BN,
- BB,
- BR,
- BQ,
- BK,
- WP,
- WN,
- WB,
- WR,
- WQ,
- WK
-};
-
-#define NOT_VALID 99
-#define BORDER_PIECE 64
-
-
-/***************************************************************************
- FUNCTION PROTOTYPES
-***************************************************************************/
-
-class mboard_state : public driver_device
-{
-public:
- mboard_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_line(*this, "LINE"),
- m_line10(*this, "LINE10"),
- m_b_white(*this, "B_WHITE"),
- m_b_black(*this, "B_BLACK"),
- m_b_buttons(*this, "B_BUTTONS"),
- m_mouse_x(*this, "MOUSE_X"),
- m_mouse_y(*this, "MOUSE_Y"),
- m_button_l(*this, "BUTTON_L"),
- m_button_r(*this, "BUTTON_R")
- { }
-
- DECLARE_READ8_MEMBER(mboard_read_board_8);
- DECLARE_WRITE8_MEMBER(mboard_write_board_8);
- DECLARE_WRITE8_MEMBER(mboard_write_LED_8);
-
- DECLARE_READ16_MEMBER(mboard_read_board_16);
- DECLARE_WRITE16_MEMBER(mboard_write_board_16);
- DECLARE_WRITE16_MEMBER(mboard_write_LED_16);
-
- DECLARE_READ32_MEMBER(mboard_read_board_32);
- DECLARE_WRITE32_MEMBER(mboard_write_board_32);
- DECLARE_WRITE32_MEMBER(mboard_write_LED_32);
-
- TIMER_DEVICE_CALLBACK_MEMBER( mboard_update_artwork);
-
- void mboard_savestate_register();
-
- void mboard_set_board();
- void mboard_set_border_pieces();
-
- inline UINT8 pos_to_num(UINT8 val);
-
- UINT8 mboard_lcd_invert;
- UINT8 mboard_key_select;
- UINT8 mboard_key_selector;
-
- int get_first_cleared_bit(UINT8 data);
-private:
- static const int start_board[64];
- static UINT8 border_pieces[12];
-
- int m_board[64];
- int save_board[64];
- UINT16 Line18_LED;
- UINT16 Line18_REED;
-
- int mouse_hold_border_piece;
- UINT8 mouse_hold_from;
- UINT8 mouse_hold_piece;
-
- int read_board_flag;
- int get_first_bit(UINT8 data);
- UINT8 read_board();
- void write_board(UINT8 data);
- void write_LED(UINT8 data);
- void board_presave();
- void board_postload();
- void clear_board();
- void set_artwork();
- void check_board_buttons();
-public:
- required_device<cpu_device> m_maincpu;
- required_ioport_array<8> m_line;
- required_ioport m_line10;
- required_ioport m_b_white;
- required_ioport m_b_black;
- required_ioport m_b_buttons;
- required_ioport m_mouse_x;
- required_ioport m_mouse_y;
- required_ioport m_button_l;
- required_ioport m_button_r;
-};
-
-
-
-#endif /* __MBOARD_H__ */
diff --git a/src/mame/includes/poisk1.h b/src/mame/includes/poisk1.h
deleted file mode 100644
index 57a24f0c052..00000000000
--- a/src/mame/includes/poisk1.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Sergey Svishchev
-/*****************************************************************************
- *
- * includes/poisk1.h
- *
- ****************************************************************************/
-
-#ifndef POISK1_H_
-#define POISK1_H_
-
-#include "imagedev/cassette.h"
-#include "machine/i8255.h"
-#include "bus/isa/isa.h"
-#include "machine/pic8259.h"
-#include "machine/pit8253.h"
-#include "machine/ram.h"
-#include "bus/isa/xsu_cards.h"
-#include "sound/speaker.h"
-
-#define POISK1_UPDATE_ROW(name) \
- void name(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride)
-
-class p1_state : public driver_device
-{
-public:
- p1_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_pic8259(*this, "pic8259"),
- m_pit8253(*this, "pit8253"),
- m_ppi8255n1(*this, "ppi8255n1"),
- m_ppi8255n2(*this, "ppi8255n2"),
- m_isabus(*this, "isa"),
- m_speaker(*this, "speaker"),
- m_cassette(*this, "cassette"),
- m_ram(*this, RAM_TAG),
- m_palette(*this, "palette") { }
-
- required_device<cpu_device> m_maincpu;
- required_device<pic8259_device> m_pic8259;
- required_device<pit8253_device> m_pit8253;
- required_device<i8255_device> m_ppi8255n1;
- required_device<i8255_device> m_ppi8255n2;
- required_device<isa8_device> m_isabus;
- required_device<speaker_sound_device> m_speaker;
- required_device<cassette_image_device> m_cassette;
- required_device<ram_device> m_ram;
-
- DECLARE_DRIVER_INIT(poisk1);
- DECLARE_MACHINE_START(poisk1);
- DECLARE_MACHINE_RESET(poisk1);
-
- DECLARE_PALETTE_INIT(p1);
- virtual void video_start() override;
- UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- void set_palette_luts();
- POISK1_UPDATE_ROW(cga_gfx_2bpp_update_row);
- POISK1_UPDATE_ROW(cga_gfx_1bpp_update_row);
- POISK1_UPDATE_ROW(poisk1_gfx_1bpp_update_row);
-
- DECLARE_WRITE_LINE_MEMBER(p1_pit8253_out2_changed);
- DECLARE_WRITE_LINE_MEMBER(p1_speaker_set_spkrdata);
- UINT8 m_p1_spkrdata;
- UINT8 m_p1_input;
-
- UINT8 m_kbpoll_mask;
-
- struct
- {
- UINT8 trap[4];
- std::unique_ptr<UINT8[]> videoram_base;
- UINT8 *videoram;
- UINT8 mode_control_6a;
- UINT8 color_select_68;
- UINT8 palette_lut_2bpp[4];
- int stride;
- void *update_row(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride);
- } m_video;
-
- DECLARE_READ8_MEMBER(p1_trap_r);
- DECLARE_WRITE8_MEMBER(p1_trap_w);
- DECLARE_READ8_MEMBER(p1_cga_r);
- DECLARE_WRITE8_MEMBER(p1_cga_w);
- DECLARE_WRITE8_MEMBER(p1_vram_w);
-
- DECLARE_READ8_MEMBER(p1_ppi_r);
- DECLARE_WRITE8_MEMBER(p1_ppi_w);
- DECLARE_WRITE8_MEMBER(p1_ppi_porta_w);
- DECLARE_READ8_MEMBER(p1_ppi_porta_r);
- DECLARE_READ8_MEMBER(p1_ppi_portb_r);
- DECLARE_READ8_MEMBER(p1_ppi_portc_r);
- DECLARE_WRITE8_MEMBER(p1_ppi_portc_w);
- DECLARE_WRITE8_MEMBER(p1_ppi2_porta_w);
- DECLARE_WRITE8_MEMBER(p1_ppi2_portb_w);
- DECLARE_READ8_MEMBER(p1_ppi2_portc_r);
- required_device<palette_device> m_palette;
- const char *m_cputag;
-};
-
-#endif /* POISK1_H_ */
diff --git a/src/mame/includes/popper.h b/src/mame/includes/popper.h
deleted file mode 100644
index 9ef9f287e95..00000000000
--- a/src/mame/includes/popper.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// license:???
-// copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli
-/***************************************************************************
-
- Popper
-
-***************************************************************************/
-
-class popper_state : public driver_device
-{
-public:
- popper_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_ol_videoram(*this, "ol_videoram"),
- m_videoram(*this, "videoram"),
- m_ol_attribram(*this, "ol_attribram"),
- m_attribram(*this, "attribram"),
- m_spriteram(*this, "spriteram"),
- m_audiocpu(*this, "audiocpu"),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
-
- /* memory pointers */
- required_shared_ptr<UINT8> m_ol_videoram;
- required_shared_ptr<UINT8> m_videoram;
- required_shared_ptr<UINT8> m_ol_attribram;
- required_shared_ptr<UINT8> m_attribram;
- required_shared_ptr<UINT8> m_spriteram;
-
- /* video-related */
- tilemap_t *m_p123_tilemap;
- tilemap_t *m_p0_tilemap;
- tilemap_t *m_ol_p123_tilemap;
- tilemap_t *m_ol_p0_tilemap;
- INT32 m_flipscreen;
- INT32 m_e002;
- INT32 m_gfx_bank;
- rectangle m_tilemap_clip;
-
- /* devices */
- required_device<cpu_device> m_audiocpu;
-
- UINT8 m_nmi_mask;
- DECLARE_READ8_MEMBER(popper_input_ports_r);
- DECLARE_READ8_MEMBER(popper_soundcpu_nmi_r);
- DECLARE_WRITE8_MEMBER(nmi_mask_w);
- DECLARE_WRITE8_MEMBER(popper_ol_videoram_w);
- DECLARE_WRITE8_MEMBER(popper_videoram_w);
- DECLARE_WRITE8_MEMBER(popper_ol_attribram_w);
- DECLARE_WRITE8_MEMBER(popper_attribram_w);
- DECLARE_WRITE8_MEMBER(popper_flipscreen_w);
- DECLARE_WRITE8_MEMBER(popper_e002_w);
- DECLARE_WRITE8_MEMBER(popper_gfx_bank_w);
- TILE_GET_INFO_MEMBER(get_popper_p123_tile_info);
- TILE_GET_INFO_MEMBER(get_popper_p0_tile_info);
- TILE_GET_INFO_MEMBER(get_popper_ol_p123_tile_info);
- TILE_GET_INFO_MEMBER(get_popper_ol_p0_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(popper);
- UINT32 screen_update_popper(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(vblank_irq);
- void draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect );
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
-};
diff --git a/src/mame/includes/qdrmfgp.h b/src/mame/includes/qdrmfgp.h
index 5c8968e12ee..565b507933b 100644
--- a/src/mame/includes/qdrmfgp.h
+++ b/src/mame/includes/qdrmfgp.h
@@ -1,5 +1,5 @@
-// license:???
-// copyright-holders:Eisuke Watanabe
+// license:BSD-3-Clause
+// copyright-holders:Hau
#include "machine/ataintf.h"
#include "sound/k054539.h"
#include "machine/k053252.h"
diff --git a/src/mame/includes/sprcros2.h b/src/mame/includes/sprcros2.h
deleted file mode 100644
index bc3a468306c..00000000000
--- a/src/mame/includes/sprcros2.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// license:???
-// copyright-holders:insideoutboy
-class sprcros2_state : public driver_device
-{
-public:
- sprcros2_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_master(*this,"master"),
- m_slave(*this,"slave"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
- m_fgvideoram(*this, "fgvideoram"),
- m_bgvideoram(*this, "bgvideoram"),
- m_spriteram(*this, "spriteram") { }
-
- required_device<cpu_device> m_master;
- required_device<cpu_device> m_slave;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
-
- required_shared_ptr<UINT8> m_fgvideoram;
- required_shared_ptr<UINT8> m_bgvideoram;
- required_shared_ptr<UINT8> m_spriteram;
-
- UINT8 m_s_port3;
- UINT8 m_port7;
- tilemap_t *m_bgtilemap;
- tilemap_t *m_fgtilemap;
-
- DECLARE_WRITE8_MEMBER(m_port7_w);
- DECLARE_WRITE8_MEMBER(s_port3_w);
- DECLARE_WRITE8_MEMBER(fgvideoram_w);
- DECLARE_WRITE8_MEMBER(bgvideoram_w);
- DECLARE_WRITE8_MEMBER(bgscrollx_w);
- DECLARE_WRITE8_MEMBER(bgscrolly_w);
-
- TILE_GET_INFO_MEMBER(get_bgtile_info);
- TILE_GET_INFO_MEMBER(get_fgtile_info);
-
- virtual void machine_start() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(sprcros2);
-
- INTERRUPT_GEN_MEMBER(s_interrupt);
- TIMER_DEVICE_CALLBACK_MEMBER(m_interrupt);
-
- UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
-};
diff --git a/src/mame/includes/suprnova.h b/src/mame/includes/suprnova.h
index 672ceb3efd5..a9eddacfe30 100644
--- a/src/mame/includes/suprnova.h
+++ b/src/mame/includes/suprnova.h
@@ -59,7 +59,6 @@ public:
required_shared_ptr<UINT32> m_cache_ram;
hit_t m_hit;
- UINT32 m_timer_0_temp[4];
bitmap_ind16 m_sprite_bitmap;
bitmap_ind16 m_tilemap_bitmap_lower;
bitmap_ind8 m_tilemap_bitmapflags_lower;
@@ -88,14 +87,20 @@ public:
int m_alt_enable_sprites;
tilemap_t *m_tilemap_A;
tilemap_t *m_tilemap_B;
-
+ UINT8 *m_btiles;
UINT8 m_region;
- DECLARE_WRITE32_MEMBER(skns_hit_w);
- DECLARE_WRITE32_MEMBER(skns_hit2_w);
- DECLARE_READ32_MEMBER(skns_hit_r);
- DECLARE_WRITE32_MEMBER(skns_io_w);
- DECLARE_WRITE32_MEMBER(skns_v3t_w);
+ DECLARE_WRITE32_MEMBER(hit_w);
+ DECLARE_WRITE32_MEMBER(hit2_w);
+ DECLARE_READ32_MEMBER(hit_r);
+ DECLARE_WRITE32_MEMBER(io_w);
+ DECLARE_WRITE32_MEMBER(v3t_w);
+ DECLARE_WRITE32_MEMBER(pal_regs_w);
+ DECLARE_WRITE32_MEMBER(palette_ram_w);
+ DECLARE_WRITE32_MEMBER(tilemapA_w);
+ DECLARE_WRITE32_MEMBER(tilemapB_w);
+ DECLARE_WRITE32_MEMBER(v3_regs_w);
+
DECLARE_READ32_MEMBER(gutsn_speedup_r);
DECLARE_READ32_MEMBER(cyvern_speedup_r);
DECLARE_READ32_MEMBER(puzzloopj_speedup_r);
@@ -111,12 +116,9 @@ public:
DECLARE_READ32_MEMBER(panicstr_speedup_r);
DECLARE_READ32_MEMBER(sengekis_speedup_r);
DECLARE_READ32_MEMBER(sengekij_speedup_r);
- DECLARE_WRITE32_MEMBER(skns_pal_regs_w);
- DECLARE_WRITE32_MEMBER(skns_palette_ram_w);
- DECLARE_WRITE32_MEMBER(skns_tilemapA_w);
- DECLARE_WRITE32_MEMBER(skns_tilemapB_w);
- DECLARE_WRITE32_MEMBER(skns_v3_regs_w);
+
DECLARE_CUSTOM_INPUT_MEMBER(paddle_r);
+
DECLARE_DRIVER_INIT(sengekis);
DECLARE_DRIVER_INIT(cyvern);
DECLARE_DRIVER_INIT(puzzloopa);
@@ -136,8 +138,7 @@ public:
DECLARE_DRIVER_INIT(senknow);
DECLARE_DRIVER_INIT(galpani4);
DECLARE_DRIVER_INIT(ryouran);
- TILE_GET_INFO_MEMBER(get_tilemap_A_tile_info);
- TILE_GET_INFO_MEMBER(get_tilemap_B_tile_info);
+ virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
virtual void video_reset() override;
@@ -146,16 +147,18 @@ public:
DECLARE_MACHINE_RESET(sknsu);
DECLARE_MACHINE_RESET(sknse);
DECLARE_MACHINE_RESET(sknsk);
- UINT32 screen_update_skns(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- void screen_eof_skns(screen_device &screen, bool state);
+
+ TILE_GET_INFO_MEMBER(get_tilemap_A_tile_info);
+ TILE_GET_INFO_MEMBER(get_tilemap_B_tile_info);
+ UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(interrupt_callback);
- TIMER_DEVICE_CALLBACK_MEMBER(skns_irq);
- void suprnova_draw_roz(bitmap_ind16 &bitmap, bitmap_ind8& bitmapflags, const rectangle &cliprect, tilemap_t *tmap, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, int columnscroll, UINT32* scrollram);
+ TIMER_DEVICE_CALLBACK_MEMBER(irq);
+ void draw_roz(bitmap_ind16 &bitmap, bitmap_ind8& bitmapflags, const rectangle &cliprect, tilemap_t *tmap, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, int columnscroll, UINT32* scrollram);
void palette_set_rgb_brightness (int offset, UINT8 brightness_r, UINT8 brightness_g, UINT8 brightness_b);
void palette_update();
- void supernova_draw_a( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran );
- void supernova_draw_b( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran );
+ void draw_a( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran );
+ void draw_b( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran );
void hit_recalc();
- void init_skns();
+ void init_drc();
void set_drc_pcflush(UINT32 addr);
};
diff --git a/src/mame/includes/svi318.h b/src/mame/includes/svi318.h
deleted file mode 100644
index 1e0fc0d0d30..00000000000
--- a/src/mame/includes/svi318.h
+++ /dev/null
@@ -1,159 +0,0 @@
-// license:???
-// copyright-holders:Sean Young,Tomas Karlsson
-/*****************************************************************************
- *
- * includes/svi318.h
- *
- * Spectravideo SVI-318 and SVI-328
- *
- ****************************************************************************/
-
-#ifndef SVI318_H_
-#define SVI318_H_
-
-#include "cpu/z80/z80.h"
-#include "machine/i8255.h"
-#include "machine/ins8250.h"
-#include "machine/wd_fdc.h"
-#include "machine/ram.h"
-#include "machine/buffer.h"
-#include "imagedev/cassette.h"
-#include "sound/dac.h"
-#include "sound/ay8910.h"
-#include "sound/wave.h"
-#include "video/mc6845.h"
-#include "video/tms9928a.h"
-#include "bus/centronics/ctronics.h"
-#include "bus/generic/slot.h"
-#include "bus/generic/carts.h"
-
-
-class svi318_state : public driver_device
-{
-public:
- svi318_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_cassette(*this, "cassette"),
- m_dac(*this, "dac"),
- m_ppi(*this, "ppi8255"),
- m_ram(*this, RAM_TAG),
- m_centronics(*this, "centronics"),
- m_cent_data_out(*this, "cent_data_out"),
- m_ins8250_0(*this, "ins8250_0"),
- m_ins8250_1(*this, "ins8250_1"),
- m_cart(*this, "cartslot"),
- m_fd1793(*this, "wd179x"),
- m_floppy0(*this, "wd179x:0"),
- m_floppy1(*this, "wd179x:1"),
- m_crtc(*this, "crtc"),
- m_line(*this, "LINE"),
- m_joysticks(*this, "JOYSTICKS"),
- m_buttons(*this, "BUTTONS"),
- m_palette(*this, "palette"),
- m_floppy(nullptr),
- m_bank1(*this, "bank1"),
- m_bank2(*this, "bank2"),
- m_bank3(*this, "bank3"),
- m_bank4(*this, "bank4")
- { }
-
- DECLARE_FLOPPY_FORMATS(floppy_formats);
-
- // FDC
- int m_drq;
- int m_irq;
-
- DECLARE_WRITE8_MEMBER(ppi_w);
- DECLARE_READ8_MEMBER(psg_port_a_r);
- DECLARE_WRITE8_MEMBER(psg_port_b_w);
- DECLARE_WRITE8_MEMBER(fdc_drive_motor_w);
- DECLARE_WRITE8_MEMBER(fdc_density_side_w);
- DECLARE_READ8_MEMBER(fdc_irqdrq_r);
- DECLARE_WRITE8_MEMBER(svi806_ram_enable_w);
- DECLARE_WRITE8_MEMBER(writemem1);
- DECLARE_WRITE8_MEMBER(writemem2);
- DECLARE_WRITE8_MEMBER(writemem3);
- DECLARE_WRITE8_MEMBER(writemem4);
- DECLARE_READ8_MEMBER(io_ext_r);
- DECLARE_WRITE8_MEMBER(io_ext_w);
- DECLARE_DRIVER_INIT(svi318);
- DECLARE_DRIVER_INIT(svi328_806);
- DECLARE_WRITE_LINE_MEMBER(vdp_interrupt);
- DECLARE_WRITE_LINE_MEMBER(ins8250_interrupt);
- DECLARE_READ8_MEMBER(ppi_port_a_r);
- DECLARE_READ8_MEMBER(ppi_port_b_r);
- DECLARE_WRITE8_MEMBER(ppi_port_c_w);
- DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w);
- DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
- bool cart_verify(UINT8 *ROM);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(svi318_cart);
- DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
- MC6845_UPDATE_ROW(crtc_update_row);
- memory_region *m_cart_rom;
- memory_region *m_bios_rom;
-
-protected:
- required_device<z80_device> m_maincpu;
- required_device<cassette_image_device> m_cassette;
- required_device<dac_device> m_dac;
- required_device<i8255_device> m_ppi;
- required_device<ram_device> m_ram;
- required_device<centronics_device> m_centronics;
- required_device<output_latch_device> m_cent_data_out;
- required_device<ins8250_device> m_ins8250_0;
- required_device<ins8250_device> m_ins8250_1;
- required_device<generic_slot_device> m_cart;
- required_device<fd1793_t> m_fd1793;
- required_device<floppy_connector> m_floppy0;
- required_device<floppy_connector> m_floppy1;
- optional_device<mc6845_device> m_crtc;
- required_ioport_array<11> m_line;
- required_ioport m_joysticks;
- required_ioport m_buttons;
- optional_device<palette_device> m_palette;
-
-private:
-
- void set_banks();
- void postload();
-
- // memory banking
- UINT8 m_bank_switch;
- UINT8 m_bank_low;
- UINT8 m_bank_high;
-
- UINT8 m_bank_low_read_only;
- UINT8 m_bank_high1_read_only;
- UINT8 m_bank_high2_read_only;
-
- std::unique_ptr<UINT8[]> m_empty_bank;
- UINT8 *m_bank_low_ptr;
- UINT8 *m_bank_high1_ptr;
- UINT8 *m_bank_high2_ptr;
-
- // keyboard
- UINT8 m_keyboard_row;
-
- floppy_image_device *m_floppy;
-
- // centronics
- int m_centronics_busy;
-
- // SVI-806 80 column card
- UINT8 m_svi806_present;
- UINT8 m_svi806_ram_enabled;
- dynamic_buffer m_svi806_ram;
- UINT8 *m_svi806_gfx;
-
- required_memory_bank m_bank1;
- required_memory_bank m_bank2;
- required_memory_bank m_bank3;
- optional_memory_bank m_bank4;
-};
-
-#endif /* SVI318_H_ */
diff --git a/src/mame/includes/tecmo16.h b/src/mame/includes/tecmo16.h
index cfdbb55acf1..f4a10d1f5be 100644
--- a/src/mame/includes/tecmo16.h
+++ b/src/mame/includes/tecmo16.h
@@ -1,5 +1,5 @@
-// license:???
-// copyright-holders:Eisuke Watanabe, Nicola Salmoria
+// license:BSD-3-Clause
+// copyright-holders:Hau, Nicola Salmoria
#include "video/tecmo_spr.h"
#include "video/tecmo_mix.h"
diff --git a/src/mame/includes/toypop.h b/src/mame/includes/toypop.h
deleted file mode 100644
index 7669fecd778..00000000000
--- a/src/mame/includes/toypop.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// license:???
-// copyright-holders:Edgardo E. Contini Salvan
-#include "machine/namcoio.h"
-#include "sound/namco.h"
-
-class toypop_state : public driver_device
-{
-public:
- enum
- {
- TIMER_NAMCOIO_RUN
- };
-
- toypop_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_videoram(*this, "videoram"),
- m_spriteram(*this, "spriteram"),
- m_m68000_sharedram(*this, "m68k_shared"),
- m_bg_image(*this, "bg_image"),
- m_maincpu(*this, "maincpu"),
- m_audiocpu(*this, "audiocpu"),
- m_subcpu(*this, "sub"),
- m_namco15xx(*this, "namco"),
- m_namco58xx(*this, "58xx"),
- m_namco56xx_1(*this, "56xx_1"),
- m_namco56xx_2(*this, "56xx_2"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
-
- required_shared_ptr<UINT8> m_videoram;
- required_shared_ptr<UINT8> m_spriteram;
- required_shared_ptr<UINT8> m_m68000_sharedram;
- required_shared_ptr<UINT16> m_bg_image;
-
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
- required_device<cpu_device> m_subcpu;
- required_device<namco_15xx_device> m_namco15xx;
- required_device<namco58xx_device> m_namco58xx;
- required_device<namco56xx_device> m_namco56xx_1;
- required_device<namco56xx_device> m_namco56xx_2;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
-
- tilemap_t *m_bg_tilemap;
-
- int m_bitmapflip;
- int m_palettebank;
- int m_interrupt_enable_68k;
- UINT8 m_main_irq_mask;
- UINT8 m_sound_irq_mask;
- DECLARE_READ16_MEMBER(toypop_m68000_sharedram_r);
- DECLARE_WRITE16_MEMBER(toypop_m68000_sharedram_w);
- DECLARE_READ8_MEMBER(toypop_main_interrupt_enable_r);
- DECLARE_WRITE8_MEMBER(toypop_main_interrupt_enable_w);
- DECLARE_WRITE8_MEMBER(toypop_main_interrupt_disable_w);
- DECLARE_WRITE8_MEMBER(toypop_sound_interrupt_enable_acknowledge_w);
- DECLARE_WRITE8_MEMBER(toypop_sound_interrupt_disable_w);
- DECLARE_WRITE8_MEMBER(toypop_sound_clear_w);
- DECLARE_WRITE8_MEMBER(toypop_sound_assert_w);
- DECLARE_WRITE8_MEMBER(toypop_m68000_clear_w);
- DECLARE_WRITE8_MEMBER(toypop_m68000_assert_w);
- DECLARE_WRITE16_MEMBER(toypop_m68000_interrupt_enable_w);
- DECLARE_WRITE16_MEMBER(toypop_m68000_interrupt_disable_w);
- DECLARE_WRITE8_MEMBER(toypop_videoram_w);
- DECLARE_WRITE8_MEMBER(toypop_palettebank_w);
- DECLARE_WRITE16_MEMBER(toypop_flipscreen_w);
- DECLARE_READ16_MEMBER(toypop_merged_background_r);
- DECLARE_WRITE16_MEMBER(toypop_merged_background_w);
- DECLARE_READ8_MEMBER(dipA_l);
- DECLARE_READ8_MEMBER(dipA_h);
- DECLARE_READ8_MEMBER(dipB_l);
- DECLARE_READ8_MEMBER(dipB_h);
- DECLARE_WRITE8_MEMBER(out_coin0);
- DECLARE_WRITE8_MEMBER(out_coin1);
- DECLARE_WRITE8_MEMBER(flip);
- TILEMAP_MAPPER_MEMBER(tilemap_scan);
- TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void machine_reset() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(toypop);
- UINT32 screen_update_toypop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(toypop_main_vblank_irq);
- INTERRUPT_GEN_MEMBER(toypop_sound_timer_irq);
- INTERRUPT_GEN_MEMBER(toypop_m68000_interrupt);
- TIMER_CALLBACK_MEMBER(namcoio_run);
- void draw_background(bitmap_ind16 &bitmap);
- void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 *spriteram_base);
-
-protected:
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-};
diff --git a/src/mame/includes/yiear.h b/src/mame/includes/yiear.h
index 1c495709603..d7af61a6429 100644
--- a/src/mame/includes/yiear.h
+++ b/src/mame/includes/yiear.h
@@ -1,5 +1,6 @@
-// license:???
-// copyright-holders:Enrique Sanchez
+// license:BSD-3-Clause
+// copyright-holders:Phil Stroffolino
+// thanks-to:Enrique Sanchez
#include "sound/sn76496.h"
#include "sound/vlm5030.h"
diff --git a/src/mame/layout/LICENSE b/src/mame/layout/LICENSE
new file mode 100644
index 00000000000..670154e3538
--- /dev/null
+++ b/src/mame/layout/LICENSE
@@ -0,0 +1,116 @@
+CC0 1.0 Universal
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific
+works ("Commons") that the public can reliably and without fear of later
+claims of infringement build upon, modify, incorporate in other works, reuse
+and redistribute as freely as possible in any form whatsoever and for any
+purposes, including without limitation commercial purposes. These owners may
+contribute to the Commons to promote the ideal of a free culture and the
+further production of creative, cultural and scientific works, or to gain
+reputation or greater distribution for their Work in part through the use and
+efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation
+of additional consideration or compensation, the person associating CC0 with a
+Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+and publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not limited
+to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
+ and translate a Work;
+
+ ii. moral rights retained by the original author(s) and/or performer(s);
+
+ iii. publicity and privacy rights pertaining to a person's image or likeness
+ depicted in a Work;
+
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+
+ v. rights protecting the extraction, dissemination, use and reuse of data in
+ a Work;
+
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation thereof,
+ including any amended or successor version of such directive); and
+
+ vii. other similar, equivalent or corresponding rights throughout the world
+ based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer's heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free,
+non transferable, non sublicensable, non exclusive, irrevocable and
+unconditional license to exercise Affirmer's Copyright and Related Rights in
+the Work (i) in all territories worldwide, (ii) for the maximum duration
+provided by applicable law or treaty (including future time extensions), (iii)
+in any current or future medium and for any number of copies, and (iv) for any
+purpose whatsoever, including without limitation commercial, advertising or
+promotional purposes (the "License"). The License shall be deemed effective as
+of the date CC0 was applied by Affirmer to the Work. Should any part of the
+License for any reason be judged legally invalid or ineffective under
+applicable law, such partial invalidity or ineffectiveness shall not
+invalidate the remainder of the License, and in such case Affirmer hereby
+affirms that he or she will not (i) exercise any of his or her remaining
+Copyright and Related Rights in the Work or (ii) assert any associated claims
+and causes of action with respect to the Work, in either case contrary to
+Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+
+ b. Affirmer offers the Work as-is and makes no representations or warranties
+ of any kind concerning the Work, express, implied, statutory or otherwise,
+ including without limitation warranties of title, merchantability, fitness
+ for a particular purpose, non infringement, or the absence of latent or
+ other defects, accuracy, or the present or absence of errors, whether or not
+ discoverable, all to the greatest extent permissible under applicable law.
+
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without limitation
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
+ disclaims responsibility for obtaining any necessary consents, permissions
+ or other rights required for any use of the Work.
+
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to this
+ CC0 or use of the Work.
+
+For more information, please see
+<http://creativecommons.org/publicdomain/zero/1.0/>
diff --git a/src/mame/layout/README.md b/src/mame/layout/README.md
new file mode 100644
index 00000000000..78ef2e5e6ad
--- /dev/null
+++ b/src/mame/layout/README.md
@@ -0,0 +1,6 @@
+# **Layout** #
+
+Layouts files are definiton files to describe look and fell of emulated machines, and are product
+of many different contributors.
+
+Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file
diff --git a/src/mame/layout/ctstein.lay b/src/mame/layout/ctstein.lay
new file mode 100644
index 00000000000..d86f5caa719
--- /dev/null
+++ b/src/mame/layout/ctstein.lay
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="static_white"><rect><color red="0.75" green="0.73" blue="0.7" /></rect></element>
+ <element name="static_white2"><rect><color red="0.6" green="0.59" blue="0.57" /></rect></element>
+
+ <element name="text_best">
+ <rect><color red="0.6" green="0.59" blue="0.57" /></rect>
+ <text string="BEST"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="text_score">
+ <rect><color red="0.6" green="0.59" blue="0.57" /></rect>
+ <text string="SCORE"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="text_start">
+ <rect><color red="0.6" green="0.59" blue="0.57" /></rect>
+ <text string="START"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="text_game">
+ <rect><color red="0.6" green="0.59" blue="0.57" /></rect>
+ <text string="GAME"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+
+ <element name="lamp_r" defstate="0">
+ <rect state="0"><color red="0.5" green="0.15" blue="0.1" /></rect>
+ <rect state="1"><color red="1.0" green="0.4" blue="0.28" /></rect>
+ </element>
+ <element name="lamp_b" defstate="0">
+ <rect state="0"><color red="0.1" green="0.15" blue="0.5" /></rect>
+ <rect state="1"><color red="0.3" green="0.42" blue="1.0" /></rect>
+ </element>
+ <element name="lamp_g" defstate="0">
+ <rect state="0"><color red="0.15" green="0.5" blue="0.1" /></rect>
+ <rect state="1"><color red="0.52" green="1.0" blue="0.4" /></rect>
+ </element>
+ <element name="lamp_y" defstate="0">
+ <rect state="0"><color red="0.5" green="0.45" blue="0.1" /></rect>
+ <rect state="1"><color red="1.0" green="0.93" blue="0.4" /></rect>
+ </element>
+
+ <element name="button_r" defstate="0">
+ <disk><color red="0.0" green="0.0" blue="0.0" /></disk>
+ <disk state="0">
+ <color red="0.8" green="0.35" blue="0.1" />
+ <bounds x="0.2" y="0.2" width="0.6" height="0.6" />
+ </disk>
+ <disk state="1">
+ <color red="0.8" green="0.35" blue="0.1" />
+ <bounds x="0.28" y="0.28" width="0.44" height="0.44" />
+ </disk>
+ </element>
+ <element name="button_b" defstate="0">
+ <disk><color red="0.0" green="0.0" blue="0.0" /></disk>
+ <disk state="0">
+ <color red="0.2" green="0.25" blue="0.8" />
+ <bounds x="0.2" y="0.2" width="0.6" height="0.6" />
+ </disk>
+ <disk state="1">
+ <color red="0.2" green="0.25" blue="0.8" />
+ <bounds x="0.28" y="0.28" width="0.44" height="0.44" />
+ </disk>
+ </element>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="0" right="50" top="0" bottom="22" />
+ <bezel element="static_white">
+ <bounds left="-1" right="51" top="-1" bottom="23" />
+ </bezel>
+
+ <bezel name="0.0" element="lamp_r" inputtag="IN.2" inputmask="0x01">
+ <bounds x="-1" y="-1" width="21" height="11" />
+ </bezel>
+ <bezel name="0.1" element="lamp_y" inputtag="IN.2" inputmask="0x02">
+ <bounds x="30" y="12" width="21" height="11" />
+ </bezel>
+ <bezel name="0.2" element="lamp_g" inputtag="IN.2" inputmask="0x04">
+ <bounds x="-1" y="12" width="21" height="11" />
+ </bezel>
+ <bezel name="0.3" element="lamp_b" inputtag="IN.2" inputmask="0x08">
+ <bounds x="30" y="-1" width="21" height="11" />
+ </bezel>
+
+ <bezel element="static_white2"><bounds x="21" y="1" width="8" height="20" /></bezel>
+
+ <bezel element="text_best"><bounds x="21.4" y="3.5" width="3" height="0.75" /></bezel>
+ <bezel element="text_score"><bounds x="25.9" y="3.5" width="3" height="0.75" /></bezel>
+ <bezel element="button_b" inputtag="IN.1" inputmask="0x02"><bounds x="24" y="3" width="2" height="2" /></bezel>
+
+ <bezel element="text_start"><bounds x="21.2" y="18.5" width="3" height="0.75" /></bezel>
+ <bezel element="text_game"><bounds x="25.8" y="18.5" width="3" height="0.75" /></bezel>
+ <bezel element="button_r" inputtag="IN.1" inputmask="0x01"><bounds x="24" y="18" width="2" height="2" /></bezel>
+
+ </view>
+</mamelayout>
diff --git a/src/mame/machine/genpc.cpp b/src/mame/machine/genpc.cpp
index 44dbcd00d20..a749180fd3a 100644
--- a/src/mame/machine/genpc.cpp
+++ b/src/mame/machine/genpc.cpp
@@ -36,12 +36,6 @@
*
*************************************************************************/
-READ8_MEMBER( ibm5160_mb_device::pc_page_r)
-{
- return 0xff;
-}
-
-
WRITE8_MEMBER( ibm5160_mb_device::pc_page_w)
{
switch(offset % 4)
@@ -528,24 +522,14 @@ ibm5160_mb_device::ibm5160_mb_device(const machine_config &mconfig, const char *
{
}
-void ibm5160_mb_device::install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler)
-{
- int buswidth = m_maincpu->space_config(AS_IO)->m_databus_width;
- switch(buswidth)
- {
- case 8:
- if(!rhandler.isnull()) m_maincpu->space(AS_IO).install_read_handler(start, end, mask, mirror, rhandler, 0);
- if(!whandler.isnull()) m_maincpu->space(AS_IO).install_write_handler(start, end, mask, mirror, whandler, 0);
- break;
- case 16:
- if(!rhandler.isnull()) m_maincpu->space(AS_IO).install_read_handler(start, end, mask, mirror, rhandler, 0xffff);
- if(!whandler.isnull()) m_maincpu->space(AS_IO).install_write_handler(start, end, mask, mirror, whandler, 0xffff);
- break;
- default:
- fatalerror("IBM5160_MOTHERBOARD: Bus width %d not supported\n", buswidth);
- }
-}
-
+DEVICE_ADDRESS_MAP_START( map, 8, ibm5160_mb_device )
+ AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237", am9517a_device, read, write)
+ AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write)
+ AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write)
+ AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
+ AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w)
+ AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w)
+ADDRESS_MAP_END
//-------------------------------------------------
// device_start - device-specific startup
@@ -553,15 +537,9 @@ void ibm5160_mb_device::install_device(offs_t start, offs_t end, offs_t mask, of
void ibm5160_mb_device::device_start()
{
- install_device(0x0000, 0x000f, 0, 0, read8_delegate(FUNC(am9517a_device::read), (am9517a_device*)m_dma8237), write8_delegate(FUNC(am9517a_device::write), (am9517a_device*)m_dma8237) );
- install_device(0x0020, 0x0021, 0, 0, read8_delegate(FUNC(pic8259_device::read), (pic8259_device*)m_pic8259), write8_delegate(FUNC(pic8259_device::write), (pic8259_device*)m_pic8259) );
- install_device(0x0040, 0x0043, 0, 0, read8_delegate(FUNC(pit8253_device::read), (pit8253_device*)m_pit8253), write8_delegate(FUNC(pit8253_device::write), (pit8253_device*)m_pit8253) );
- install_device(0x0060, 0x0063, 0, 0, read8_delegate(FUNC(i8255_device::read), (i8255_device*)m_ppi8255), write8_delegate(FUNC(i8255_device::write), (i8255_device*)m_ppi8255) );
- install_device(0x0080, 0x0087, 0, 0, read8_delegate(FUNC(ibm5160_mb_device::pc_page_r), this), write8_delegate(FUNC(ibm5160_mb_device::pc_page_w),this) );
- install_device(0x00a0, 0x00a1, 0, 0, read8_delegate(), write8_delegate(FUNC(ibm5160_mb_device::nmi_enable_w),this));
- /* MESS managed RAM */
- if ( m_ram->pointer() )
- membank( "bank10" )->set_base( m_ram->pointer() );
+ if(!m_ram->started())
+ throw device_missing_dependencies();
+ m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - 1, m_ram->pointer());
}
@@ -607,6 +585,10 @@ static MACHINE_CONFIG_FRAGMENT( ibm5150_mb_config )
MCFG_DEVICE_MODIFY("pc_kbdc")
MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ibm5150_mb_device, keyboard_clock_w))
+ MCFG_DEVICE_MODIFY("ppi8255")
+ MCFG_I8255_OUT_PORTB_CB(WRITE8(ibm5150_mb_device, pc_ppi_portb_w))
+ MCFG_I8255_IN_PORTC_CB(READ8(ibm5150_mb_device, pc_ppi_portc_r))
+
MCFG_CASSETTE_ADD( "cassette" )
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
MACHINE_CONFIG_END
@@ -636,15 +618,6 @@ ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, const char *
{
}
-void ibm5150_mb_device::device_start()
-{
- ibm5160_mb_device::device_start();
-}
-void ibm5150_mb_device::device_reset()
-{
- ibm5160_mb_device::device_reset();
-}
-
READ8_MEMBER (ibm5150_mb_device::pc_ppi_porta_r)
{
int data = 0xFF;
@@ -788,6 +761,10 @@ const device_type EC1841_MOTHERBOARD = &device_creator<ec1841_mb_device>;
static MACHINE_CONFIG_FRAGMENT( ec1841_mb_config )
MCFG_FRAGMENT_ADD(ibm5160_mb_config)
+ MCFG_DEVICE_MODIFY("ppi8255")
+ MCFG_I8255_OUT_PORTB_CB(WRITE8(ec1841_mb_device, pc_ppi_portb_w))
+ MCFG_I8255_IN_PORTC_CB(READ8(ec1841_mb_device, pc_ppi_portc_r))
+
MCFG_DEVICE_MODIFY("pc_kbdc")
MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ec1841_mb_device, keyboard_clock_w))
MACHINE_CONFIG_END
@@ -857,11 +834,6 @@ ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, const char *ta
void ec1841_mb_device::device_start()
{
- ibm5160_mb_device::device_start();
-}
-void ec1841_mb_device::device_reset()
-{
- ibm5160_mb_device::device_reset();
}
// kbd interface is 5150-like but PB2 controls access to second bank of DIP switches (SA2).
@@ -939,16 +911,12 @@ ioport_constructor pc_noppi_mb_device::device_input_ports() const
return INPUT_PORTS_NAME( pc_noppi_mb );
}
-void pc_noppi_mb_device::device_start()
-{
- install_device(0x0000, 0x000f, 0, 0, read8_delegate(FUNC(am9517a_device::read), (am9517a_device*)m_dma8237), write8_delegate(FUNC(am9517a_device::write), (am9517a_device*)m_dma8237) );
- install_device(0x0020, 0x0021, 0, 0, read8_delegate(FUNC(pic8259_device::read), (pic8259_device*)m_pic8259), write8_delegate(FUNC(pic8259_device::write), (pic8259_device*)m_pic8259) );
- install_device(0x0040, 0x0043, 0, 0, read8_delegate(FUNC(pit8253_device::read), (pit8253_device*)m_pit8253), write8_delegate(FUNC(pit8253_device::write), (pit8253_device*)m_pit8253) );
- install_device(0x0080, 0x0087, 0, 0, read8_delegate(FUNC(ibm5160_mb_device::pc_page_r), this), write8_delegate(FUNC(ibm5160_mb_device::pc_page_w),this) );
- install_device(0x00a0, 0x00a1, 0, 0, read8_delegate(), write8_delegate(FUNC(ibm5160_mb_device::nmi_enable_w),this));
- /* MESS managed RAM */
- if ( m_ram->pointer() )
- membank( "bank10" )->set_base( m_ram->pointer() );
-}
+DEVICE_ADDRESS_MAP_START( map, 8, pc_noppi_mb_device )
+ AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237", am9517a_device, read, write)
+ AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write)
+ AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write)
+ AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w)
+ AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w)
+ADDRESS_MAP_END
const device_type PCNOPPI_MOTHERBOARD = &device_creator<pc_noppi_mb_device>;
diff --git a/src/mame/machine/mboard.cpp b/src/mame/machine/mboard.cpp
deleted file mode 100644
index 255391d5bb8..00000000000
--- a/src/mame/machine/mboard.cpp
+++ /dev/null
@@ -1,568 +0,0 @@
-// license:???
-// copyright-holders:Ralf Schaefer, Cowering
-/**********************************************************************
-
- Mephisto Chess Computers
-
-**********************************************************************/
-#include "emu.h"
-#include "includes/mboard.h"
-/***************************************************************************
- TYPE DEFINITIONS
-***************************************************************************/
-
-#define IsPiece(x) ((m_board[x] >=1) && (m_board[x] <=12))
-
-const int mboard_state::start_board[64] =
-{
- BR, BN, BB, BQ, BK, BB, BN, BR,
- BP, BP, BP, BP, BP, BP, BP, BP,
- EM, EM, EM, EM, EM, EM, EM, EM,
- EM, EM, EM, EM, EM, EM, EM, EM,
- EM, EM, EM, EM, EM, EM, EM, EM,
- EM, EM, EM, EM, EM, EM, EM, EM,
- WP, WP, WP, WP, WP, WP, WP, WP,
- WR, WN, WB, WQ, WK, WB, WN, WR
-};
-
-UINT8 mboard_state::border_pieces[12] = {WK,WQ,WR,WB,WN,WP,BK,BQ,BR,BB,BN,BP,};
-
-
-int mboard_state::get_first_bit(UINT8 data)
-{
- int i;
-
- for (i = 0; i < 8; i++)
- if (BIT(data, i))
- return i;
-
- return NOT_VALID;
-}
-
-
-inline UINT8 mboard_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;
- }
-}
-
-int mboard_state::get_first_cleared_bit(UINT8 data)
-{
- int i;
-
- for (i=0;i<8;i++)
- if (!BIT(data, i))
- return i;
-
- return NOT_VALID;
-}
-
-UINT8 mboard_state::read_board()
-{
- UINT8 i_18, i_AH;
- UINT8 data;
-
- data = 0xff;
-
-/*
-
-Example board scan:
-Starting postion and pawn on E2 is lifted
-
-
-mask: 7f 0111 1111 Line 8
-data: 0 0000 0000 all fields occupied
-mask: bf 1011 1111 Line 7
-data: 0 0000 0000 all fields occupied
-mask: df 1101 1111 Line 6
-data: ff 1111 1111 all fields empty
-mask: ef 1110 1111 Line 5
-data: ff 1111 1111 all fields empty
-mask: f7 1111 0111 Line 4
-data: ff 1111 1111 all fields empty
-mask: fb 1111 1011 Line 3
-data: ff 1111 1111 all fields empty
-mask: fd 1111 1101 Line 2
-data: 10 0001 0000 E2 is empty rest is occupied
-mask: fe 1111 1110 Line 1
-data: 0 0000 0000 all fields occupied
-
-
-*/
-
-/* looking for cleared bit in mask Line18_REED => current line */
-
- if (data && Line18_REED)
- {
- i_18 = get_first_cleared_bit(Line18_REED);
-
- if (i_18 == NOT_VALID)
- printf("No cleared bit in mask Line18_REED!\n");
- else
- {
- /* looking for a piece in this line and clear bit in data if found */
-
- for (i_AH = 0; i_AH < 8; i_AH = i_AH + 1)
- if (IsPiece(64 - (i_18 * 8 + 8 - i_AH)))
- data &= ~(1 << i_AH); // clear bit
-
- read_board_flag = TRUE;
- }
- }
-
- return data;
-}
-
-
-void mboard_state::write_board(UINT8 data)
-{
- Line18_REED=data;
-
- if (read_board_flag && !strcmp(machine().system().name,"glasgow") ) //HACK
- Line18_LED = 0;
- else
- Line18_LED = data;
-
- read_board_flag = FALSE;
-
- if (data == 0xff)
- mboard_key_selector = 0;
-}
-
-
-
-void mboard_state::write_LED(UINT8 data)
-{
- int i;
- UINT8 i_AH, i_18;
- UINT8 LED;
-
- mboard_lcd_invert = 1;
-/*
-
-Example: turn led E2 on
-
-mask: fd 1111 1101 Line 2
-data: 10 0001 0000 Line E
-
-*/
-
- for (i=0; i < 64; i++) /* all LED's off */
- output().set_led_value(i, 0);
-
- if (Line18_LED)
- {
- for (i_AH = 0; i_AH < 8; i_AH++) /* turn LED on depending on bit masks */
- {
- if (BIT(data,i_AH))
- {
- for (i_18 = 0; i_18 < 8; i_18++)
- {
- LED = (i_18*8 + 8-i_AH-1);
- if (!(Line18_LED & (1 << i_18))) /* cleared bit */
- output().set_led_value(LED, 1);
- //else
- // output().set_led_value(LED, 0);
- }
- }
- }
- }
-
-}
-
-
-
-READ8_MEMBER(mboard_state::mboard_read_board_8)
-{
- UINT8 data;
-
- data=read_board();
- logerror("Read Board Port Data = %d\n ",data);
- return data;
-}
-
-READ16_MEMBER(mboard_state::mboard_read_board_16)
-{
- UINT8 data;
-
- data=read_board();
- return data << 8;
-}
-
-READ32_MEMBER(mboard_state::mboard_read_board_32)
-{
- UINT8 data;
-
- data=read_board();
- return data<<24;
-}
-
-WRITE8_MEMBER(mboard_state::mboard_write_board_8)
-{
- write_board(data);
- logerror("Write Board Port Data = %02x\n",data);
-}
-
-WRITE16_MEMBER(mboard_state::mboard_write_board_16)
-{
- if (data & 0xff) write_board(data);
- logerror("write board 16 %08x\n",data);
- write_board(data>>8);
-}
-
-WRITE32_MEMBER(mboard_state::mboard_write_board_32)
-{
-// data |= data << 24;
-//printf("write board %08x %08x\n",offset,data);
- logerror("write board 32 o: %08x d: %08x\n",offset,data);
- if (offset) write_board(data);
- else write_board(data>>24);
-}
-
-WRITE8_MEMBER(mboard_state::mboard_write_LED_8)
-{
- write_LED(data);
- space.device().execute().spin_until_time(attotime::from_usec(7));
-}
-
-WRITE16_MEMBER(mboard_state::mboard_write_LED_16)
-{
- write_LED(data >> 8);
- space.device().execute().spin_until_time(attotime::from_usec(9));
-}
-
-WRITE32_MEMBER(mboard_state::mboard_write_LED_32)
-{
-// data = data | data << 24;
-//printf("write LED %08x %08x\n",offset,data);
- if (offset) write_LED(data);
- else write_LED(data >> 24);
- logerror("write LED 32 o: %08x d: %08x\n",offset,data);
-// space.device().execute().spin_until_time(ATTOTIME_IN_USEC(20));
-}
-
-
-/* save states callback */
-
-void mboard_state::board_presave()
-{
- int i;
- for (i=0;i<64;i++)
- save_board[i]=m_board[i];
-}
-
-void mboard_state::board_postload()
-{
- int i;
- for (i=0;i<64;i++)
- m_board[i]=save_board[i];
-
-}
-
-void mboard_state::mboard_savestate_register()
-{
- save_item(NAME(save_board));
- machine().save().register_postload(save_prepost_delegate(FUNC(mboard_state::board_postload),this));
- machine().save().register_presave(save_prepost_delegate(FUNC(mboard_state::board_presave),this));
-}
-
-void mboard_state::mboard_set_board()
-{
- read_board_flag = TRUE;
- int i;
- for (i=0;i<64;i++)
- m_board[i]=start_board[i];
-}
-
-void mboard_state::clear_board()
-{
- int i;
- for (i=0;i<64;i++)
- m_board[i]=EM;
-}
-
-void mboard_state::set_artwork()
-{
- int i;
- for (i=0;i<64;i++)
- output().set_indexed_value("P", i, m_board[i]);
-}
-
-void mboard_state::mboard_set_border_pieces()
-{
- int i;
- for (i=0;i<12;i++)
- output().set_indexed_value("Q", i, border_pieces[i]);
-}
-
-TIMER_DEVICE_CALLBACK_MEMBER(mboard_state::mboard_update_artwork )
-{
- check_board_buttons();
- set_artwork();
- mboard_set_border_pieces();
-}
-
-void mboard_state::check_board_buttons()
-{
- int field;
- int i;
- UINT8 port_input=0;
- UINT8 data = 0xff;
- static UINT8 board_row = 0;
- static UINT16 mouse_down = 0;
- UINT8 pos2num_res = 0;
- board_row++;
- board_row &= 7;
- int click_on_border_piece=FALSE;
-
-
-/* check click on border pieces */
- i=0;
- port_input = m_b_black->read();
- if (port_input)
- {
- i=get_first_bit(port_input)+6;
- click_on_border_piece=TRUE;
- }
-
- port_input = m_b_white->read();
- if (port_input)
- {
- i=get_first_bit(port_input);
- click_on_border_piece=TRUE;
- }
-
- if (click_on_border_piece)
- {
- if (!mouse_down)
- {
- if (border_pieces[i] > 12 ) /* second click on selected border piece */
- {
- mouse_hold_border_piece=FALSE;
- border_pieces[i]=border_pieces[i]-12;
- mouse_hold_from=0;
- mouse_hold_piece=0;
- }
- else if (!mouse_hold_piece) /*select border piece */
- {
- if (mouse_hold_border_piece)
- border_pieces[mouse_hold_from]=border_pieces[mouse_hold_from]-12;
-
- mouse_hold_from=i;
- mouse_hold_piece=border_pieces[i];
- border_pieces[i]=border_pieces[i]+12;
- mouse_hold_border_piece=TRUE;
- }
-
- mouse_down = board_row + 1;
-
- }
- return;
- }
-
-
-/* check click on board */
- data = m_line[board_row]->read();
-
- if ((data != 0xff) && (!mouse_down) )
- {
- pos2num_res = pos_to_num(data);
- field=64-(board_row*8+8-pos2num_res);
-
-
- if (!(pos2num_res < 8))
- logerror("Position out of bound!");
-
- else if ((mouse_hold_piece) && (!IsPiece(field)))
- {
- /* Moving a piece onto a blank */
- m_board[field] = mouse_hold_piece;
-
- if (mouse_hold_border_piece)
- {
- border_pieces[mouse_hold_from]=border_pieces[mouse_hold_from]-12;
- }else if ( field != mouse_hold_from ) /* Put a selected piece back to the source field */
- m_board[mouse_hold_from] = 0;
-
-
- mouse_hold_from = 0;
- mouse_hold_piece = 0;
- mouse_hold_border_piece=FALSE;
- }
- else if ((!mouse_hold_piece) )
- {
- /* Picking up a piece */
-
- if (IsPiece(field))
- {
- mouse_hold_from = field;
- mouse_hold_piece = m_board[field];
- m_board[field] = m_board[field]+12;
- }
-
- }
-
- mouse_down = board_row + 1;
- }
- else if ((data == 0xff) && (mouse_down == (board_row + 1))) /* Wait for mouse to be released */
- mouse_down = 0;
-
-/* check click on border - remove selected piece*/
- if (m_line10->read())
- {
- if (mouse_hold_piece)
- {
- if (mouse_hold_border_piece)
- border_pieces[mouse_hold_from]=border_pieces[mouse_hold_from]-12;
- else
- m_board[mouse_hold_from] = 0;
-
- mouse_hold_from = 0;
- mouse_hold_piece = 0;
- mouse_hold_border_piece = FALSE;
- }
-
- return;
- }
-
-/* check additional buttons */
- if (data == 0xff)
- {
- port_input = m_b_buttons->read();
- if (port_input==0x01)
- {
- clear_board();
- return;
- }else if (port_input==0x02)
- {
- mboard_set_board();
- return;
- }
-
-
- }
-
-}
-
-extern INPUT_PORTS_START( chessboard )
-
- PORT_START("LINE.0")
- 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("LINE.1")
- 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("LINE.2")
- 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("LINE.3")
- 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("LINE.4")
- 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("LINE.5")
- 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("LINE.6")
- 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("LINE.7")
- 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_HIGH, IPT_KEYBOARD)
-
- PORT_START("B_WHITE")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD)
-
- PORT_START("B_BLACK")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD)
-
- PORT_START("B_BUTTONS")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD)
-
- PORT_START("MOUSE_X")
- PORT_BIT( 0xffff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100)
-
- PORT_START("MOUSE_Y")
- PORT_BIT( 0xffff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(100)
-
- PORT_START("BUTTON_L")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CODE(MOUSECODE_BUTTON1) PORT_NAME("left button")
-
- PORT_START("BUTTON_R")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CODE(MOUSECODE_BUTTON2) PORT_NAME("right button")
-
-
-INPUT_PORTS_END
diff --git a/src/mame/machine/ns10crypt.cpp b/src/mame/machine/ns10crypt.cpp
index e639108166c..5683b35bc82 100644
--- a/src/mame/machine/ns10crypt.cpp
+++ b/src/mame/machine/ns10crypt.cpp
@@ -1,4 +1,4 @@
-// license:BSD-3
+// license:BSD-3-Clause
// copyright-holders:Andreas Naive
/****************************************************************************
Namco System 10 decryption emulation
diff --git a/src/mame/machine/ns10crypt.h b/src/mame/machine/ns10crypt.h
index 163a4ac21c7..d6d40174c81 100644
--- a/src/mame/machine/ns10crypt.h
+++ b/src/mame/machine/ns10crypt.h
@@ -1,4 +1,4 @@
-// license:BSD-3
+// license:BSD-3-Clause
// copyright-holders:Andreas Naive
#ifndef _NS10CRYPT_H_
diff --git a/src/mame/machine/pcshare.cpp b/src/mame/machine/pcshare.cpp
index e6d3451c5c4..46b53464304 100644
--- a/src/mame/machine/pcshare.cpp
+++ b/src/mame/machine/pcshare.cpp
@@ -14,12 +14,8 @@
***************************************************************************/
#include "emu.h"
-#include "cpu/i386/i386.h"
#include "machine/pcshare.h"
-#include "machine/pckeybrd.h"
-#include "machine/mc146818.h"
-#include "machine/idectrl.h"
-
+#include "cpu/i86/i286.h"
/******************
DMA8237 Controller
diff --git a/src/mame/machine/svi318.cpp b/src/mame/machine/svi318.cpp
deleted file mode 100644
index 098e5576b4d..00000000000
--- a/src/mame/machine/svi318.cpp
+++ /dev/null
@@ -1,767 +0,0 @@
-// license:???
-// copyright-holders:Sean Young,Tomas Karlsson
-/*
-** Spectravideo SVI-318 and SVI-328
-**
-** Sean Young, Tomas Karlsson
-**
-*/
-
-#include "emu.h"
-#include "video/mc6845.h"
-#include "includes/svi318.h"
-#include "cpu/z80/z80.h"
-#include "video/tms9928a.h"
-#include "imagedev/flopdrv.h"
-#include "formats/svi_cas.h"
-#include "sound/ay8910.h"
-
-enum {
- SVI_INTERNAL = 0,
- SVI_CART = 1,
- SVI_EXPRAM2 = 2,
- SVI_EXPRAM3 = 3
-};
-
-
-/* Serial ports */
-
-WRITE_LINE_MEMBER(svi318_state::ins8250_interrupt)
-{
- if (m_bank_low != SVI_CART)
- m_maincpu->set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
-}
-
-#if 0
-static INS8250_REFRESH_CONNECT( svi318_com_refresh_connected )
-{
- /* Motorola MC14412 modem */
- ins8250_handshake_in(device, UART8250_HANDSHAKE_IN_CTS|UART8250_HANDSHAKE_IN_DSR|UART8250_INPUTS_RING_INDICATOR|UART8250_INPUTS_DATA_CARRIER_DETECT);
-}
-#endif
-
-/* Cartridge */
-
-bool svi318_state::cart_verify(UINT8 *ROM)
-{
- if (ROM[0] != 0xf3 || ROM[1] != 0x31)
- return false;
-
- return true;
-}
-
-DEVICE_IMAGE_LOAD_MEMBER( svi318_state, svi318_cart )
-{
- UINT32 size = m_cart->common_get_size("rom");
-
- if (size > 0x8000)
- {
- logerror("Cart image %s larger than expected. Please report the issue.\n", image.filename());
- return IMAGE_INIT_FAIL;
- }
-
- m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
-
- if (image.software_entry() == nullptr && !cart_verify(m_cart->get_rom_base()))
- return IMAGE_INIT_FAIL;
-
- return IMAGE_INIT_PASS;
-}
-
-
-
-/* PPI */
-
-/*
- PPI Port A Input (address 98H)
- Bit Name Description
- 1 TA Joystick 1, /SENSE
- 2 TB Joystick 1, EOC
- 3 TC Joystick 2, /SENSE
- 4 TD Joystick 2, EOC
- 5 TRIGGER1 Joystick 1, Trigger
- 6 TRIGGER2 Joystick 2, Trigger
- 7 /READY Cassette, Ready
- 8 CASR Cassette, Read data
-*/
-
-READ8_MEMBER(svi318_state::ppi_port_a_r)
-{
- int data = 0x0f;
-
- if (m_cassette->input() > 0.0038)
- data |= 0x80;
- if (!m_cassette->exists())
- data |= 0x40;
-
- data |= m_buttons->read() & 0x30;
-
- return data;
-}
-
-/*
- PPI Port B Input (address 99H)
- Bit Name Description
- 1 IN0 Keyboard, Column status of selected line
- 2 IN1 Keyboard, Column status of selected line
- 3 IN2 Keyboard, Column status of selected line
- 4 IN3 Keyboard, Column status of selected line
- 5 IN4 Keyboard, Column status of selected line
- 6 IN5 Keyboard, Column status of selected line
- 7 IN6 Keyboard, Column status of selected line
- 8 IN7 Keyboard, Column status of selected line
-*/
-
-READ8_MEMBER(svi318_state::ppi_port_b_r)
-{
- if (m_keyboard_row <= 10)
- return m_line[m_keyboard_row]->read();
- else
- return 0xff;
-}
-
-/*
- PPI Port C Output (address 97H)
- Bit Name Description
- 1 KB0 Keyboard, Line select 0
- 2 KB1 Keyboard, Line select 1
- 3 KB2 Keyboard, Line select 2
- 4 KB3 Keyboard, Line select 3
- 5 CASON Cassette, Motor relay control (0=on, 1=off)
- 6 CASW Cassette, Write data
- 7 CASAUD Cassette, Audio out (pulse)
- 8 SOUND Keyboard, Click sound bit (pulse)
-*/
-
-WRITE8_MEMBER(svi318_state::ppi_port_c_w)
-{
- int val;
-
- /* key click */
- val = (data & 0x80) ? 0x3e : 0;
- val += (data & 0x40) ? 0x3e : 0;
- m_dac->write_signed8(val);
-
- /* cassette motor on/off */
- if (m_cassette->exists())
- {
- m_cassette->change_state(
- (data & 0x10) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED,
- CASSETTE_MOTOR_DISABLED);
- }
-
- /* cassette signal write */
- m_cassette->output((data & 0x20) ? -1.0 : +1.0);
-
- m_keyboard_row = data & 0x0f;
-}
-
-WRITE8_MEMBER(svi318_state::ppi_w)
-{
- m_ppi->write(space, offset + 2, data);
-}
-
-
-/* PSG */
-
-/*
- PSG Port A Input
- Bit Name Description
- 1 FWD1 Joystick 1, Forward
- 2 BACK1 Joystick 1, Back
- 3 LEFT1 Joystick 1, Left
- 4 RIGHT1 Joystick 1, Right
- 5 FWD2 Joystick 2, Forward
- 6 BACK2 Joystick 2, Back
- 7 LEFT2 Joystick 2, Left
- 8 RIGHT2 Joystick 2, Right
-*/
-
-READ8_MEMBER(svi318_state::psg_port_a_r)
-{
- return m_joysticks->read();
-}
-
-/*
- PSG Port B Output
- Bit Name Description
- 1 /CART Memory bank 11, ROM 0000-7FFF (Cartridge /CCS1, /CCS2)
- 2 /BK21 Memory bank 21, RAM 0000-7FFF
- 3 /BK22 Memory bank 22, RAM 8000-FFFF
- 4 /BK31 Memory bank 31, RAM 0000-7FFF
- 5 /BK32 Memory bank 32, RAM 8000-7FFF
- 6 CAPS Caps-Lock diod
- 7 /ROMEN0 Memory bank 12, ROM 8000-BFFF* (Cartridge /CCS3)
- 8 /ROMEN1 Memory bank 12, ROM C000-FFFF* (Cartridge /CCS4)
-
- * The /CART signal must be active for any effect and all banks
- with RAM are disabled.
-*/
-
-WRITE8_MEMBER(svi318_state::psg_port_b_w)
-{
- if ((m_bank_switch ^ data) & 0x20)
- output().set_led_value(0, !(data & 0x20));
-
- m_bank_switch = data;
- set_banks();
-}
-
-/* Disk drives */
-
-WRITE_LINE_MEMBER(svi318_state::fdc_intrq_w)
-{
- m_irq = state;
-}
-
-WRITE_LINE_MEMBER(svi318_state::fdc_drq_w)
-{
- m_drq = state;
-}
-
-WRITE8_MEMBER(svi318_state::fdc_drive_motor_w)
-{
- m_floppy = nullptr;
-
- if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
- if (BIT(data, 1)) m_floppy = m_floppy1->get_device();
-
- m_fd1793->set_floppy(m_floppy);
-
- if (m_floppy0->get_device())
- m_floppy0->get_device()->mon_w(!BIT(data, 2));
-
- if (m_floppy1->get_device())
- m_floppy1->get_device()->mon_w(!BIT(data, 3));
-}
-
-WRITE8_MEMBER(svi318_state::fdc_density_side_w)
-{
- m_fd1793->dden_w(BIT(data, 0));
-
- if (m_floppy)
- m_floppy->ss_w(BIT(data, 1));
-}
-
-READ8_MEMBER(svi318_state::fdc_irqdrq_r)
-{
- UINT8 result = 0;
-
- result |= m_drq << 6;
- result |= m_irq << 7;
-
- return result;
-}
-
-MC6845_UPDATE_ROW( svi318_state::crtc_update_row )
-{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
-
- for (int i = 0; i < x_count; i++)
- {
- UINT8 data = m_svi806_gfx[m_svi806_ram[(ma + i) & 0x7ff] * 16 + ra];
-
- if (i == cursor_x)
- {
- data = 0xff;
- }
-
- for (int j = 0; j < 8; j++)
- {
- bitmap.pix32(y, i * 8 + j) = palette[TMS9928A_PALETTE_SIZE + BIT(data, 7)];
- data = data << 1;
- }
- }
-}
-
-
-WRITE8_MEMBER(svi318_state::svi806_ram_enable_w)
-{
- m_svi806_ram_enabled = (data & 0x01);
- set_banks();
-}
-
-
-/* Init functions */
-
-static const UINT8 cc_op[0x100] = {
- 4+1,10+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1, 4+1,11+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1,
- 8+1,10+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1,12+1,11+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1,
- 7+1,10+1,16+1, 6+1, 4+1, 4+1, 7+1, 4+1, 7+1,11+1,16+1, 6+1, 4+1, 4+1, 7+1, 4+1,
- 7+1,10+1,13+1, 6+1,11+1,11+1,10+1, 4+1, 7+1,11+1,13+1, 6+1, 4+1, 4+1, 7+1, 4+1,
- 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1,
- 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1,
- 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1,
- 7+1, 7+1, 7+1, 7+1, 7+1, 7+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1,
- 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1,
- 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1,
- 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1,
- 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1,
- 5+1,10+1,10+1,10+1,10+1,11+1, 7+1,11+1, 5+1,10+1,10+1, 0+1,10+1,17+1, 7+1,11+1,
- 5+1,10+1,10+1,11+1,10+1,11+1, 7+1,11+1, 5+1, 4+1,10+1,11+1,10+1, 0+1, 7+1,11+1,
- 5+1,10+1,10+1,19+1,10+1,11+1, 7+1,11+1, 5+1, 4+1,10+1, 4+1,10+1, 0+1, 7+1,11+1,
- 5+1,10+1,10+1, 4+1,10+1,11+1, 7+1,11+1, 5+1, 6+1,10+1, 4+1,10+1, 0+1, 7+1,11+1
-};
-
-static const UINT8 cc_cb[0x100] = {
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2
-};
-
-static const UINT8 cc_ed[0x100] = {
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,
-12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 9+2,12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 9+2,
-12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 9+2,12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 9+2,
-12+2,12+2,15+2,20+2, 8+2,14+2, 8+2,18+2,12+2,12+2,15+2,20+2, 8+2,14+2, 8+2,18+2,
-12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 8+2,12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,
-16+2,16+2,16+2,16+2, 8+2, 8+2, 8+2, 8+2,16+2,16+2,16+2,16+2, 8+2, 8+2, 8+2, 8+2,
-16+2,16+2,16+2,16+2, 8+2, 8+2, 8+2, 8+2,16+2,16+2,16+2,16+2, 8+2, 8+2, 8+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,
- 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2
-};
-
-static const UINT8 cc_xy[0x100] = {
- 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2,15+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2,
- 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2,15+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2,
- 4+2,14+2,20+2,10+2, 9+2, 9+2, 9+2, 4+2, 4+2,15+2,20+2,10+2, 9+2, 9+2, 9+2, 4+2,
- 4+2, 4+2, 4+2, 4+2,23+2,23+2,19+2, 4+2, 4+2,15+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2,
- 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2,
- 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2,
- 9+2, 9+2, 9+2, 9+2, 9+2, 9+2,19+2, 9+2, 9+2, 9+2, 9+2, 9+2, 9+2, 9+2,19+2, 9+2,
-19+2,19+2,19+2,19+2,19+2,19+2, 4+2,19+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2,
- 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2,
- 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2,
- 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2,
- 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2,
- 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 0+2, 4+2, 4+2, 4+2, 4+2,
- 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2,
- 4+2,14+2, 4+2,23+2, 4+2,15+2, 4+2, 4+2, 4+2, 8+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2,
- 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2,10+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2
-};
-
-static const UINT8 cc_xycb[0x100] = {
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,
-20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,
-20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,
-20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,
-20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,
-23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2
-};
-
-/* extra cycles if jr/jp/call taken and 'interrupt latency' on rst 0-7 */
-static const UINT8 cc_ex[0x100] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* DJNZ */
- 5, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, /* JR NZ/JR Z */
- 5, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, /* JR NC/JR C */
- 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+1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, /* LDIR/CPIR/INIR/OTIR LDDR/CPDR/INDR/OTDR */
- 6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2,
- 6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2,
- 6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2,
- 6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2+1
-};
-
-
-DRIVER_INIT_MEMBER(svi318_state, svi318)
-{
- /* z80 stuff */
- m_maincpu->z80_set_cycle_tables(cc_op, cc_cb, cc_ed, cc_xy, cc_xycb, cc_ex);
-
- m_maincpu->set_input_line_vector(0, 0xff);
-
- /* memory */
- m_empty_bank = std::make_unique<UINT8[]>(0x8000);
- memset(m_empty_bank.get(), 0xff, 0x8000);
-
- m_bank_low_ptr = m_empty_bank.get();
- m_bank_high1_ptr = m_empty_bank.get();
- m_bank_high2_ptr = m_empty_bank.get();
-}
-
-DRIVER_INIT_MEMBER(svi318_state, svi328_806)
-{
- DRIVER_INIT_CALL(svi318);
- m_svi806_present = 1;
-}
-
-void svi318_state::machine_start()
-{
- std::string region_tag;
- m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
- m_bios_rom = memregion("maincpu");
-
- // 80 column card start
- if (m_svi806_present)
- {
- // 2K RAM, but allocating 4KB to make banking easier
- // The upper 2KB will be set to FFs and will never be written to
- m_svi806_ram.resize(0x1000);
- save_item(NAME(m_svi806_ram));
- memset(&m_svi806_ram[0], 0x00, 0x800);
- memset(&m_svi806_ram[0x800], 0xff, 0x800);
-
- m_svi806_gfx = memregion("gfx1")->base();
-
- // Set SVI-806 80 column card palette
- m_palette->set_pen_color(TMS9928A_PALETTE_SIZE, 0, 0, 0); /* Monochrome black */
- m_palette->set_pen_color(TMS9928A_PALETTE_SIZE+1, 0, 224, 0); /* Monochrome green */
- }
-
- // register for savestates
- save_item(NAME(m_drq));
- save_item(NAME(m_irq));
-
- save_item(NAME(m_bank_switch));
- save_item(NAME(m_bank_low));
- save_item(NAME(m_bank_high));
- save_item(NAME(m_bank_low_read_only));
- save_item(NAME(m_bank_high1_read_only));
- save_item(NAME(m_bank_high2_read_only));
- save_item(NAME(m_keyboard_row));
- save_item(NAME(m_centronics_busy));
-
- save_item(NAME(m_svi806_present));
- save_item(NAME(m_svi806_ram_enabled));
-
- machine().save().register_postload(save_prepost_delegate(FUNC(svi318_state::postload), this));
-}
-
-void svi318_state::machine_reset()
-{
- m_keyboard_row = 0;
- m_centronics_busy = 0;
- m_svi806_present = 0;
- m_svi806_ram_enabled = 0;
- m_drq = 0;
- m_irq = 0;
-
- m_bank_low = 0;
- m_bank_high = 0;
- m_bank_low_read_only = 0;
- m_bank_high1_read_only = 0;
- m_bank_high2_read_only = 0;
-
- m_bank_switch = 0xff;
- set_banks();
-}
-
-/* Memory */
-
-WRITE8_MEMBER(svi318_state::writemem1)
-{
- if (m_bank_low_read_only)
- return;
-
- m_bank_low_ptr[offset] = data;
-}
-
-WRITE8_MEMBER(svi318_state::writemem2)
-{
- if (m_bank_high1_read_only)
- return;
-
- m_bank_high1_ptr[offset] = data;
-}
-
-WRITE8_MEMBER(svi318_state::writemem3)
-{
- if (m_bank_high2_read_only)
- return;
-
- m_bank_high2_ptr[offset] = data;
-}
-
-WRITE8_MEMBER(svi318_state::writemem4)
-{
- if (m_svi806_ram_enabled)
- {
- if (offset < 0x800)
- m_svi806_ram[offset] = data;
- }
- else
- {
- if (m_bank_high2_read_only)
- return;
-
- m_bank_high2_ptr[0x3000 + offset] = data;
- }
-}
-
-void svi318_state::set_banks()
-{
- const UINT8 v = m_bank_switch;
- UINT8 *ram = m_ram->pointer();
- UINT32 ram_size = m_ram->size();
-
- m_bank_low = (v & 1) ? ((v & 2) ? ((v & 8) ? SVI_INTERNAL : SVI_EXPRAM3) : SVI_EXPRAM2) : SVI_CART;
- m_bank_high = (v & 4) ? ((v & 16) ? SVI_INTERNAL : SVI_EXPRAM3) : SVI_EXPRAM2;
-
- m_bank_low_ptr = m_empty_bank.get();
- m_bank_low_read_only = 1;
-
- switch (m_bank_low)
- {
- case SVI_INTERNAL:
- m_bank_low_ptr = m_bios_rom->base();
- break;
- case SVI_CART:
- if (m_cart_rom)
- m_bank_low_ptr = m_cart_rom->base();
- break;
- case SVI_EXPRAM2:
- if (ram_size >= 64 * 1024)
- {
- m_bank_low_ptr = ram + ram_size - 64 * 1024;
- m_bank_low_read_only = 0;
- }
- break;
- case SVI_EXPRAM3:
- if (ram_size > 128 * 1024)
- {
- m_bank_low_ptr = ram + ram_size - 128 * 1024;
- m_bank_low_read_only = 0;
- }
- break;
- }
-
- m_bank_high1_ptr = m_empty_bank.get();
- m_bank_high1_read_only = 1;
- m_bank_high2_ptr = m_empty_bank.get();
- m_bank_high2_read_only = 1;
-
- switch (m_bank_high)
- {
- case SVI_INTERNAL:
- if (ram_size == 16 * 1024)
- {
- m_bank_high2_ptr = ram;
- m_bank_high2_read_only = 0;
- }
- else
- {
- m_bank_high1_ptr = ram;
- m_bank_high1_read_only = 0;
- m_bank_high2_ptr = ram + 0x4000;
- m_bank_high2_read_only = 0;
- }
- break;
- case SVI_EXPRAM2:
- if (ram_size > 64 * 1024)
- {
- m_bank_high1_ptr = ram + ram_size - 64 * 1024 + 32 * 1024;
- m_bank_high1_read_only = 0;
- m_bank_high2_ptr = ram + ram_size - 64 * 1024 + 48 * 1024;
- m_bank_high2_read_only = 0;
- }
- break;
- case SVI_EXPRAM3:
- if (ram_size > 128 * 1024)
- {
- m_bank_high1_ptr = ram + ram_size - 128 * 1024 + 32 * 1024;
- m_bank_high1_read_only = 0;
- m_bank_high2_ptr = ram + ram_size - 128 * 1024 + 48 * 1024;
- m_bank_high2_read_only = 0;
- }
- break;
- }
-
- /* Check for special CART based banking */
- if (m_bank_low == SVI_CART && (v & 0xc0 ) != 0xc0)
- {
- m_bank_high1_ptr = m_empty_bank.get();
- m_bank_high1_read_only = 1;
- m_bank_high2_ptr = m_empty_bank.get();
- m_bank_high2_read_only = 1;
-
- if (m_cart_rom && !(v & 0x80))
- m_bank_high2_ptr = m_cart_rom->base() + 0x4000;
- if (m_cart_rom && !(v & 0x40))
- m_bank_high1_ptr = m_cart_rom->base();
- }
-
- m_bank1->set_base(m_bank_low_ptr);
- m_bank2->set_base(m_bank_high1_ptr);
- m_bank3->set_base(m_bank_high2_ptr);
-
- /* SVI-806 80 column card specific banking */
- if (m_svi806_present)
- {
- if (m_svi806_ram_enabled)
- m_bank4->set_base(&m_svi806_ram[0]);
- else
- m_bank4->set_base(m_bank_high2_ptr + 0x3000);
- }
-}
-
-void svi318_state::postload()
-{
- set_banks();
-}
-
-
-/* External I/O */
-
-WRITE_LINE_MEMBER(svi318_state::write_centronics_busy)
-{
- m_centronics_busy = state;
-}
-
-READ8_MEMBER(svi318_state::io_ext_r)
-{
- if (m_bank_low == SVI_CART)
- return 0xff;
-
- switch (offset)
- {
- case 0x12:
- return 0xfe | m_centronics_busy;
-
- case 0x20:
- case 0x21:
- case 0x22:
- case 0x23:
- case 0x24:
- case 0x25:
- case 0x26:
- case 0x27:
- return m_ins8250_0->ins8250_r(space, offset & 7);
-
- case 0x28:
- case 0x29:
- case 0x2a:
- case 0x2b:
- case 0x2c:
- case 0x2d:
- case 0x2e:
- case 0x2f:
- return m_ins8250_1->ins8250_r(space, offset & 7);
-
- case 0x30:
- return m_fd1793->status_r(space, 0);
-
- case 0x31:
- return m_fd1793->track_r(space, 0);
-
- case 0x32:
- return m_fd1793->sector_r(space, 0);
-
- case 0x33:
- return m_fd1793->data_r(space, 0);
-
- case 0x34:
- return fdc_irqdrq_r(space, 0);
-
- case 0x51:
- return m_crtc->register_r(space, offset);
- }
-
- return 0xff;
-}
-
-WRITE8_MEMBER(svi318_state::io_ext_w)
-{
- if (m_bank_low == SVI_CART)
- return;
-
- switch (offset)
- {
- case 0x10:
- m_cent_data_out->write(space, 0, data);
- break;
-
- case 0x11:
- m_centronics->write_strobe(BIT(data, 0));
- break;
-
- case 0x20:
- case 0x21:
- case 0x22:
- case 0x23:
- case 0x24:
- case 0x25:
- case 0x26:
- case 0x27:
- m_ins8250_0->ins8250_w(space, offset & 7, data);
- break;
-
- case 0x28:
- case 0x29:
- case 0x2A:
- case 0x2B:
- case 0x2C:
- case 0x2D:
- case 0x2E:
- case 0x2F:
- m_ins8250_1->ins8250_w(space, offset & 7, data);
- break;
-
- case 0x30:
- m_fd1793->cmd_w(space, 0, data);
- break;
- case 0x31:
- m_fd1793->track_w(space, 0, data);
- break;
- case 0x32:
- m_fd1793->sector_w(space, 0, data);
- break;
- case 0x33:
- m_fd1793->data_w(space, 0, data);
- break;
- case 0x34:
- fdc_drive_motor_w(space, 0, data);
- break;
- case 0x38:
- fdc_density_side_w(space, 0, data);
- break;
-
- case 0x50:
- m_crtc->address_w(space, offset, data);
- break;
- case 0x51:
- m_crtc->register_w(space, offset, data);
- break;
-
- case 0x58:
- svi806_ram_enable_w(space, 0, data);
- break;
- }
-}
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 541f9f28b86..310c0325d17 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -32745,6 +32745,7 @@ mbutrfly // (c) 1999 (Bordun International?)
neraidou // Bootleg?
skylncr // (c) 1995 Bordun International
sstar97 // (c) 199? Bordun International
+bdream97 // Bootleg?
@source:skyraid.cpp
skyraid // 009709 1978/03 [6502]
@@ -35063,6 +35064,7 @@ atlantol // bootleg
hyprolym // GX361 (c) 1983
hyprolymb // bootleg
hyprolymba // bootleg
+hipoly // bootleg
mastkin // (c) 1988 Du Tech
reaktor // (c) 1985 Zilec
trackfld // GX361 (c) 1983
diff --git a/src/mame/mess.flt b/src/mame/mess.flt
index 00289661e14..28a2befb2cb 100644
--- a/src/mame/mess.flt
+++ b/src/mame/mess.flt
@@ -123,7 +123,6 @@ concept.cpp
cortex.cpp
cosmicos.cpp
cp1.cpp
-cps1.cpp
craft.cpp
crvision.cpp
ct486.cpp
@@ -672,3 +671,9 @@ zorba.cpp
zrt80.cpp
zsbc3.cpp
zx.cpp
+//exceptions + to add - to remove form imported list
+-orbatak
++wofch
++sfzch
++sfach
++sfzbch
diff --git a/src/mame/video/bking.cpp b/src/mame/video/bking.cpp
index ac3851e7217..d9b82ddd7e5 100644
--- a/src/mame/video/bking.cpp
+++ b/src/mame/video/bking.cpp
@@ -1,5 +1,5 @@
-// license:???
-// copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari
+// license:BSD-3-Clause
+// copyright-holders:Mike Balfour, Zsolt Vasvari
/***************************************************************************
bking.c
diff --git a/src/mame/video/carjmbre.cpp b/src/mame/video/carjmbre.cpp
deleted file mode 100644
index 374dcc0f9b9..00000000000
--- a/src/mame/video/carjmbre.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-// license:???
-// copyright-holders:insideoutboy, Nicola Salmoria
-/***************************************************************************
-
- Car Jamboree
- Omori Electric CAD (OEC) 1983
-
-***************************************************************************/
-
-#include "emu.h"
-#include "video/resnet.h"
-#include "includes/carjmbre.h"
-
-// palette info from Popper (OEC 1983, very similar video hw)
-static const res_net_decode_info carjmbre_decode_info =
-{
- 1, // there may be two proms needed to construct color
- 0, 63, // start/end
- // R, G, B,
- { 0, 0, 0, }, // offsets
- { 0, 3, 6, }, // shifts
- {0x07,0x07,0x03, } // masks
-};
-
-static const res_net_info carjmbre_net_info =
-{
- RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_TTL_OUT,
- {
- { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } },
- { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } },
- { RES_NET_AMP_NONE, 0, 0, 2, { 470, 220, 0 } }
- }
-};
-
-PALETTE_INIT_MEMBER(carjmbre_state, carjmbre)
-{
- const UINT8 *color_prom = memregion("proms")->base();
- std::vector<rgb_t> rgb;
-
- compute_res_net_all(rgb, color_prom, carjmbre_decode_info, carjmbre_net_info);
- palette.set_pen_colors(0, rgb);
- palette.palette()->normalize_range(0, 63);
-}
-
-
-
-WRITE8_MEMBER(carjmbre_state::carjmbre_flipscreen_w)
-{
- m_flipscreen = (data & 1) ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0;
- machine().tilemap().set_flip_all(m_flipscreen);
-}
-
-WRITE8_MEMBER(carjmbre_state::carjmbre_bgcolor_w)
-{
- data = ~data & 0x3f;
-
- if (data != m_bgcolor)
- {
- int i;
-
- m_bgcolor = data;
- if (data & 3)
- for (i = 0; i < 64; i += 4)
- m_palette->set_pen_color(i, data);
- else
- // restore to initial state (black)
- for (i = 0; i < 64; i += 4)
- m_palette->set_pen_color(i, rgb_t::black);
- }
-}
-
-WRITE8_MEMBER(carjmbre_state::carjmbre_8806_w)
-{
- // unknown, gets updated at same time as carjmbre_bgcolor_w
-}
-
-WRITE8_MEMBER(carjmbre_state::carjmbre_videoram_w)
-{
- m_videoram[offset] = data;
- m_cj_tilemap->mark_tile_dirty(offset & 0x3ff);
-}
-
-
-
-TILE_GET_INFO_MEMBER(carjmbre_state::get_carjmbre_tile_info)
-{
- UINT32 tile_number = m_videoram[tile_index] & 0xff;
- UINT8 attr = m_videoram[tile_index + 0x400];
- tile_number += (attr & 0x80) << 1; /* bank */
-
- SET_TILE_INFO_MEMBER(0,
- tile_number,
- attr & 0xf,
- 0);
-}
-
-void carjmbre_state::video_start()
-{
- m_cj_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(carjmbre_state::get_carjmbre_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
- save_item(NAME(m_flipscreen));
- save_item(NAME(m_bgcolor));
-}
-
-UINT32 carjmbre_state::screen_update_carjmbre(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- int offs, troffs, sx, sy, flipx, flipy;
-
- //colorram
- //76543210
- //x------- graphic bank
- //-xxx---- unused
- //----xxxx colour
-
- m_cj_tilemap->draw(screen, bitmap, cliprect, 0, 0);
-
- //spriteram[offs]
- //+0 y pos
- //+1 sprite number
- //+2
- //76543210
- //x------- flipy
- //-x------ flipx
- //--xx---- unused
- //----xxxx colour
- //+3 x pos
- for (offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
- {
- //before copying the sprites to spriteram the game reorders the first
- //sprite to last, sprite ordering is incorrect if this isn't undone
- troffs = (offs - 4 + m_spriteram.bytes()) % m_spriteram.bytes();
-
- //unused sprites are marked with ypos <= 0x02 (or >= 0xfd if screen flipped)
- if (m_spriteram[troffs] > 0x02 && m_spriteram[troffs] < 0xfd)
- {
- sx = m_spriteram[troffs + 3] - 7;
- sy = 241 - m_spriteram[troffs];
- flipx = (m_spriteram[troffs + 2] & 0x40) >> 6;
- flipy = (m_spriteram[troffs + 2] & 0x80) >> 7;
-
- if (m_flipscreen)
- {
- sx = (256 + (226 - sx)) % 256;
- sy = 242 - sy;
- flipx = !flipx;
- flipy = !flipy;
- }
-
- m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
- m_spriteram[troffs + 1],
- m_spriteram[troffs + 2] & 0xf,
- flipx,flipy,
- sx,sy,0);
- }
- }
- return 0;
-}
diff --git a/src/mame/video/flower.cpp b/src/mame/video/flower.cpp
deleted file mode 100644
index b7fee29475b..00000000000
--- a/src/mame/video/flower.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-// license:???
-// copyright-holders:insideoutboy, David Haywood, Stephh
-/* Flower Video Hardware */
-
-#include "emu.h"
-#include "includes/flower.h"
-
-
-void flower_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect )
-{
- gfx_element *gfx = m_gfxdecode->gfx(1);
- UINT8 *source = m_spriteram + 0x200;
- UINT8 *finish = source - 0x200;
-
- source -= 8;
-
- while( source>=finish )
- {
- int xblock,yblock;
- int sy = 256-32-source[0]+1;
- int sx = (source[4]|(source[5]<<8))-55;
- int code = source[1] & 0x3f;
- int color = (source[6]>>4);
-
- /*
- Byte 0: Y
- Byte 1:
- 0x80 - FlipY
- 0x40 - FlipX
- 0x3f - Tile
- Byte 2:
- 0x08 - Tile MSB
- 0x01 - Tile MSB
- Byte 3:
- 0x07 - X Zoom
- 0x08 - X Size
- 0x70 - Y Zoom
- 0x80 - Y Size
- Byte 4: X LSB
- Byte 5: X MSB
- Byte 6:
- 0xf0 - Colour
- */
-
- int flipy = source[1] & 0x80;
- int flipx = source[1] & 0x40;
-
- int size = source[3];
-
- int xsize = ((size & 0x08)>>3);
- int ysize = ((size & 0x80)>>7);
-
- xsize++;
- ysize++;
-
- if (ysize==2) sy -= 16;
-
- code |= ((source[2] & 0x01) << 6);
- code |= ((source[2] & 0x08) << 4);
-
- if(flip_screen())
- {
- flipx = !flipx;
- flipy = !flipy;
- sx = sx+16;
- sy = 250-sy;
-
- if (ysize==2) sy += 16;
- }
-
- for (xblock = 0; xblock<xsize; xblock++)
- {
- int xoffs=!flipx ? (xblock*8) : ((xsize-xblock-1)*8);
- int zoomx=((size&7)+1)<<13;
- int zoomy=((size&0x70)+0x10)<<9;
- int xblocksizeinpixels=(zoomx*16)>>16;
- int yblocksizeinpixels=(zoomy*16)>>16;
-
- for (yblock = 0; yblock<ysize; yblock++)
- {
- int yoffs=!flipy ? yblock : (ysize-yblock-1);
- int sxoffs=(16-xblocksizeinpixels)/2;
- int syoffs=(16-yblocksizeinpixels)/2;
- if (xblock) sxoffs+=xblocksizeinpixels;
- if (yblock) syoffs+=yblocksizeinpixels;
-
- gfx->zoom_transpen(bitmap,cliprect,
- code+yoffs+xoffs,
- color,
- flipx,flipy,
- sx+sxoffs,sy+syoffs,
- zoomx,zoomy,15);
- }
- }
- source -= 8;
- }
-
-}
-
-TILE_GET_INFO_MEMBER(flower_state::get_bg0_tile_info)
-{
- int code = m_bg0ram[tile_index];
- int color = m_bg0ram[tile_index+0x100];
- /* Todo - may be tile flip bits? */
-
- SET_TILE_INFO_MEMBER(2, code, color>>4, 0);
-}
-
-TILE_GET_INFO_MEMBER(flower_state::get_bg1_tile_info)
-{
- int code = m_bg1ram[tile_index];
- int color = m_bg1ram[tile_index+0x100];
- /* Todo - may be tile flip bits? */
-
- SET_TILE_INFO_MEMBER(2, code, color>>4, 0);
-}
-
-TILE_GET_INFO_MEMBER(flower_state::get_text_tile_info)
-{
- int code = m_textram[tile_index];
- int color = m_textram[tile_index+0x400];
- /* Todo - may be tile flip bits? */
-
- SET_TILE_INFO_MEMBER(0, code, color>>2, 0);
-}
-
-void flower_state::video_start()
-{
- m_bg0_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(flower_state::get_bg0_tile_info),this), TILEMAP_SCAN_ROWS,16,16,16,16);
- m_bg1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(flower_state::get_bg1_tile_info),this), TILEMAP_SCAN_ROWS,16,16,16,16);
- m_text_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(flower_state::get_text_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,32,32);
- m_text_right_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(flower_state::get_text_tile_info),this),TILEMAP_SCAN_COLS, 8, 8, 2,32);
-
- m_bg1_tilemap->set_transparent_pen(15);
- m_text_tilemap->set_transparent_pen(3);
- m_text_right_tilemap->set_transparent_pen(3);
-
- m_text_tilemap->set_scrolly(0, 16);
- m_text_right_tilemap->set_scrolly(0, 16);
-}
-
-UINT32 flower_state::screen_update_flower(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- rectangle myclip = cliprect;
-
- m_bg0_tilemap->set_scrolly(0, m_bg0_scroll[0]+16);
- m_bg1_tilemap->set_scrolly(0, m_bg1_scroll[0]+16);
-
- m_bg0_tilemap->draw(screen, bitmap, cliprect, 0,0);
- m_bg1_tilemap->draw(screen, bitmap, cliprect, 0,0);
-
- draw_sprites(bitmap,cliprect);
-
- if(flip_screen())
- {
- myclip.min_x = cliprect.min_x;
- myclip.max_x = cliprect.min_x + 15;
- }
- else
- {
- myclip.min_x = cliprect.max_x - 15;
- myclip.max_x = cliprect.max_x;
- }
-
- m_text_tilemap->draw(screen, bitmap, cliprect, 0,0);
- m_text_right_tilemap->draw(screen, bitmap, myclip, 0,0);
- return 0;
-}
-
-WRITE8_MEMBER(flower_state::flower_textram_w)
-{
- m_textram[offset] = data;
- m_text_tilemap->mark_tile_dirty(offset);
- m_text_right_tilemap->mark_all_dirty();
-}
-
-WRITE8_MEMBER(flower_state::flower_bg0ram_w)
-{
- m_bg0ram[offset] = data;
- m_bg0_tilemap->mark_tile_dirty(offset & 0x1ff);
-}
-
-WRITE8_MEMBER(flower_state::flower_bg1ram_w)
-{
- m_bg1ram[offset] = data;
- m_bg1_tilemap->mark_tile_dirty(offset & 0x1ff);
-}
-
-WRITE8_MEMBER(flower_state::flower_flipscreen_w)
-{
- flip_screen_set(data);
-}
diff --git a/src/mame/video/galastrm.cpp b/src/mame/video/galastrm.cpp
index b2841777249..0bda7291482 100644
--- a/src/mame/video/galastrm.cpp
+++ b/src/mame/video/galastrm.cpp
@@ -1,4 +1,4 @@
-// license:???
+// license:BSD-3-Clause
// copyright-holders:Hau
#include "emu.h"
#include "includes/galastrm.h"
diff --git a/src/mame/video/pc_t1t.cpp b/src/mame/video/pc_t1t.cpp
index b5931d4daba..8c7b2fafdfd 100644
--- a/src/mame/video/pc_t1t.cpp
+++ b/src/mame/video/pc_t1t.cpp
@@ -49,13 +49,14 @@ pc_t1t_device::pc_t1t_device(const machine_config &mconfig, device_type type, co
m_display_enable(0),
m_vsync(0),
m_palette_base(0),
- m_palette(*this,"palette")
+ m_palette(*this,"palette"),
+ m_ram(*this, ":" RAM_TAG),
+ m_vram(*this, "vram")
{
}
pcvideo_t1000_device::pcvideo_t1000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : pc_t1t_device(mconfig, PCVIDEO_T1000, "Tandy 1000 Graphics Adapter", tag, owner, clock, "tandy_1000_graphics_adapter", __FILE__),
- m_t1_displayram(nullptr)
+ : pc_t1t_device(mconfig, PCVIDEO_T1000, "Tandy 1000 Graphics Adapter", tag, owner, clock, "tandy_1000_graphics_adapter", __FILE__)
{
}
@@ -68,24 +69,35 @@ pcvideo_pcjr_device::pcvideo_pcjr_device(const machine_config &mconfig, const ch
void pcvideo_t1000_device::device_start()
{
+ if(!m_ram->started())
+ throw device_missing_dependencies();
m_chr_gen = machine().root_device().memregion("gfx1")->base();
m_bank = 0;
m_chr_size = 1;
m_ra_offset = 256;
+ m_vram->space(AS_0).install_ram(0, 128*1024 - 1, m_ram->pointer());
}
void pcvideo_pcjr_device::device_start()
{
+ if(!m_ram->started())
+ throw device_missing_dependencies();
m_chr_gen = machine().root_device().memregion("gfx1")->base();
m_bank = 0;
m_mode_control = 0x08;
m_chr_size = 8;
m_ra_offset = 1;
if(!strncmp(machine().system().name, "ibmpcjx", 7))
+ {
m_jxkanji = machine().root_device().memregion("kanji")->base();
+ m_vram->space(AS_0).install_ram(0, 128*1024 - 1, memshare(":vram")->ptr()); // TODO: fix when this is really understood
+ }
else
+ {
m_jxkanji = nullptr;
+ m_vram->space(AS_0).install_ram(0, 128*1024 - 1, m_ram->pointer());
+ }
}
@@ -95,6 +107,11 @@ void pcvideo_pcjr_device::device_start()
***************************************************************************/
+static ADDRESS_MAP_START(vram_map, AS_0, 8, pcvideo_t1000_device)
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x20000, 0x3ffff) AM_NOP
+ADDRESS_MAP_END
+
MACHINE_CONFIG_FRAGMENT( pcvideo_t1000 )
MCFG_SCREEN_ADD(T1000_SCREEN_NAME, RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL_14_31818MHz,912,0,640,262,0,200)
@@ -109,6 +126,13 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_t1000 )
MCFG_MC6845_UPDATE_ROW_CB(pc_t1t_device, crtc_update_row)
MCFG_MC6845_OUT_DE_CB(WRITELINE(pc_t1t_device, t1000_de_changed))
MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(pcvideo_t1000_device, t1000_vsync_changed))
+
+ MCFG_DEVICE_ADD("vram", ADDRESS_MAP_BANK, 0)
+ MCFG_DEVICE_PROGRAM_MAP(vram_map)
+ MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE)
+ MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8)
+ MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(18)
+ MCFG_ADDRESS_MAP_BANK_STRIDE(0x4000)
MACHINE_CONFIG_END
machine_config_constructor pcvideo_t1000_device::device_mconfig_additions() const
@@ -116,7 +140,6 @@ machine_config_constructor pcvideo_t1000_device::device_mconfig_additions() cons
return MACHINE_CONFIG_NAME( pcvideo_t1000 );
}
-
MACHINE_CONFIG_FRAGMENT( pcvideo_pcjr )
MCFG_SCREEN_ADD(T1000_SCREEN_NAME, RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL_14_31818MHz,912,0,640,262,0,200)
@@ -131,6 +154,12 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_pcjr )
MCFG_MC6845_UPDATE_ROW_CB(pcvideo_pcjr_device, crtc_update_row)
MCFG_MC6845_OUT_DE_CB(WRITELINE(pc_t1t_device, t1000_de_changed))
MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(pcvideo_pcjr_device, pcjr_vsync_changed))
+ MCFG_DEVICE_ADD("vram", ADDRESS_MAP_BANK, 0)
+ MCFG_DEVICE_PROGRAM_MAP(vram_map)
+ MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE)
+ MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8)
+ MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(18)
+ MCFG_ADDRESS_MAP_BANK_STRIDE(0x4000)
MACHINE_CONFIG_END
machine_config_constructor pcvideo_pcjr_device::device_mconfig_additions() const
@@ -474,22 +503,6 @@ MC6845_UPDATE_ROW( pcvideo_pcjr_device::crtc_update_row )
}
-READ8_MEMBER( pcvideo_t1000_device::videoram_r )
-{
- UINT8 *videoram = m_t1_displayram;
- int data = 0xff;
- if( videoram )
- data = videoram[offset];
- return data;
-}
-
-WRITE8_MEMBER( pcvideo_t1000_device::videoram_w )
-{
- UINT8 *videoram = m_t1_displayram;
- if( videoram )
- videoram[offset] = data;
-}
-
void pcvideo_t1000_device::mode_switch( void )
{
switch( m_mode_control & 0x3B )
@@ -798,78 +811,66 @@ int pc_t1t_device::vga_data_r(void)
*/
void pcvideo_t1000_device::bank_w(int data)
{
- if (m_bank != data)
+ int dram, vram;
+ if ((data&0xc0)==0xc0) /* needed for lemmings */
{
- UINT8 *ram = machine().root_device().memregion("maincpu")->base();
- int dram, vram;
- m_bank = data;
- /* it seems the video ram is mapped to the last 128K of main memory */
-#if 1
- if ((data&0xc0)==0xc0) /* needed for lemmings */
- {
- dram = 0x80000 + ((data & 0x06) << 14);
- vram = 0x80000 + ((data & 0x30) << (14-3));
- }
- else
- {
- dram = 0x80000 + ((data & 0x07) << 14);
- vram = 0x80000 + ((data & 0x38) << (14-3));
- }
-#else
- dram = (data & 0x07) << 14;
- vram = (data & 0x38) << (14-3);
-#endif
- m_t1_displayram = &ram[vram];
- m_displayram = &ram[dram];
- mode_switch();
+ dram = (m_bank & 0x06);// | ((m_bank & 0x1800) >> 8);
+ vram = ((m_bank & 0x30) >> 3);// | ((m_bank & 0x6000) >> 10);
+ }
+ else
+ {
+ dram = (m_bank & 0x07);// | ((m_bank & 0x1800) >> 8);
+ vram = ((m_bank & 0x38) >> 3);// | ((m_bank & 0x6000) >> 10);
}
+ m_displayram = m_ram->pointer() + (dram << 14);
+ if(m_disable)
+ return;
+ m_vram->set_bank(vram);
+ if((m_bank & 0xc0) != (data & 0xc0))
+ mode_switch();
}
void pcvideo_pcjr_device::pc_pcjr_bank_w(int data)
{
- if (m_bank != data)
+ int dram, vram;
+ m_bank = data;
+ /* it seems the video ram is mapped to the last 128K of main memory */
+ if ((data&0xc0)==0xc0) /* needed for lemmings */
{
- int dram, vram;
- m_bank = data;
- /* it seems the video ram is mapped to the last 128K of main memory */
- if ((data&0xc0)==0xc0) /* needed for lemmings */
- {
- dram = ((data & 0x06) << 14);
- vram = ((data & 0x30) << (14-3));
- }
- else
- {
- dram = ((data & 0x07) << 14);
- vram = ((data & 0x38) << (14-3));
- }
- machine().root_device().membank( "bank14" )->set_base( machine().device<ram_device>(RAM_TAG)->pointer() + vram );
- m_displayram = machine().device<ram_device>(RAM_TAG)->pointer() + dram;
- pc_pcjr_mode_switch();
+ dram = (data & 0x06);
+ vram = (data & 0x30) >> 3;
}
+ else
+ {
+ dram = (data & 0x07);
+ vram = (data & 0x38) >> 3;
+ }
+ m_vram->set_bank(vram);
+ m_displayram = m_ram->pointer() + (dram << 14);
+ if((m_bank & 0xc0) != (data & 0xc0))
+ pc_pcjr_mode_switch();
}
void pcvideo_pcjr_device::pc_pcjx_bank_w(int data)
{
- if (m_bank != data)
+ int dram, vram;
+ m_bank = data;
+ if ((data&0xc0)==0xc0) /* needed for lemmings */
{
- int dram, vram;
- m_bank = data;
- /* this probably isn't right, but otherwise the memory test stomps on the vram */
- if ((data&0xc0)==0xc0) /* needed for lemmings */
- {
- dram = 0x80000 + ((data & 0x06) << 14);
- vram = 0x80000 + ((data & 0x30) << (14-3));
- }
- else
- {
- dram = 0x80000 + ((data & 0x07) << 14);
- vram = 0x80000 + ((data & 0x38) << (14-3));
- }
- machine().root_device().membank( "bank14" )->set_base( machine().device<ram_device>(RAM_TAG)->pointer() + vram );
- m_displayram = machine().device<ram_device>(RAM_TAG)->pointer() + dram;
- pc_pcjr_mode_switch();
+ dram = (data & 0x06);
+ vram = (data & 0x30) >> 3;
+ }
+ else
+ {
+ dram = (data & 0x07);
+ vram = (data & 0x38) >> 3;
}
+ m_vram->set_bank(vram);
+ /* this certainly isn't correct but otherwise the memory test stomps on the vram */
+ m_displayram = (UINT8 *)memshare(":vram")->ptr() + (dram << 14);
+ if((m_bank & 0xc0) != (data & 0xc0))
+ pc_pcjr_mode_switch();
}
int pc_t1t_device::bank_r(void)
@@ -909,17 +910,19 @@ WRITE8_MEMBER( pcvideo_t1000_device::write )
case 12:
break;
case 13:
+ m_bank = (data << 8) | (m_bank & 0xff);
+ bank_w(m_bank);
break;
case 14:
vga_data_w(data);
break;
case 15:
+ m_bank = (m_bank & 0xff00) | data;
bank_w(data);
break;
}
}
-
WRITE8_MEMBER( pcvideo_pcjr_device::write )
{
switch( offset )
@@ -1005,7 +1008,6 @@ READ8_MEMBER( pc_t1t_device::read )
return data;
}
-
WRITE_LINE_MEMBER( pc_t1t_device::t1000_de_changed )
{
m_display_enable = state ? 1 : 0;
@@ -1021,6 +1023,14 @@ WRITE_LINE_MEMBER( pcvideo_t1000_device::t1000_vsync_changed )
}
}
+WRITE_LINE_MEMBER( pcvideo_t1000_device::disable_w )
+{
+ if(state)
+ m_vram->set_bank(8);
+ else
+ bank_w(m_bank);
+ m_disable = state ? true : false;
+}
WRITE_LINE_MEMBER( pcvideo_pcjr_device::pcjr_vsync_changed )
{
diff --git a/src/mame/video/pc_t1t.h b/src/mame/video/pc_t1t.h
index 7dc6f981762..34839955b95 100644
--- a/src/mame/video/pc_t1t.h
+++ b/src/mame/video/pc_t1t.h
@@ -4,6 +4,8 @@
#define PC_T1T_H
#include "video/mc6845.h"
+#include "machine/ram.h"
+#include "machine/bankdev.h"
#define T1000_SCREEN_NAME "screen"
#define T1000_MC6845_NAME "mc6845_t1000"
@@ -39,6 +41,7 @@ public:
DECLARE_PALETTE_INIT( pcjr );
DECLARE_WRITE_LINE_MEMBER( t1000_de_changed );
+ DECLARE_READ8_MEMBER( read );
virtual MC6845_UPDATE_ROW( crtc_update_row );
MC6845_UPDATE_ROW( t1000_text_inten_update_row );
@@ -48,13 +51,14 @@ public:
MC6845_UPDATE_ROW( t1000_gfx_2bpp_tga_update_row );
MC6845_UPDATE_ROW( t1000_gfx_1bpp_update_row );
+protected:
required_device<mc6845_device> m_mc6845;
UINT8 m_mode_control, m_color_select;
UINT8 m_status;
struct reg m_reg;
- UINT8 m_bank;
+ UINT16 m_bank;
int m_pc_framecnt;
@@ -80,8 +84,9 @@ public:
int vga_data_r(void);
int bank_r(void);
- DECLARE_READ8_MEMBER( read );
required_device<palette_device> m_palette;
+ required_device<ram_device> m_ram;
+ required_device<address_map_bank_device> m_vram;
};
class pcvideo_t1000_device : public pc_t1t_device
@@ -91,20 +96,19 @@ public:
pcvideo_t1000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_WRITE8_MEMBER( write );
- DECLARE_READ8_MEMBER( videoram_r );
- DECLARE_WRITE8_MEMBER( videoram_w );
DECLARE_WRITE_LINE_MEMBER( t1000_vsync_changed );
+ DECLARE_WRITE_LINE_MEMBER( disable_w );
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void device_start() override;
private:
- UINT8 *m_t1_displayram;
void mode_switch( void );
void vga_data_w(int data);
void bank_w(int data);
void mode_control_w(int data);
+ bool m_disable;
};
extern const device_type PCVIDEO_T1000;
diff --git a/src/mame/video/poisk1.cpp b/src/mame/video/poisk1.cpp
deleted file mode 100644
index 6f2a102bde4..00000000000
--- a/src/mame/video/poisk1.cpp
+++ /dev/null
@@ -1,322 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Sergey Svishchev
-/*
- * Poisk-1 does not have a real mc6845 and always runs in graphics mode.
- * Text mode is emulated by BIOS.
- * Video RAM in native graphics mode starts at 0xB8000, in emulated text mode -- at 0xBC000.
- */
-
-#include "emu.h"
-
-#include "includes/poisk1.h"
-
-#define CGA_PALETTE_SETS 83
-/* one for colour, one for mono, 81 for colour composite */
-
-#include "video/cgapal.h"
-
-#define BG_COLOR(x) (((x) & 7)|(((x) & 0x10) >> 1))
-
-#define VERBOSE_DBG 0
-
-#define DBG_LOG(N,M,A) \
- do { \
- if(VERBOSE_DBG>=N) \
- { \
- if( M ) \
- logerror("%11.6f: %-24s",machine().time().as_double(),(char*)M ); \
- logerror A; \
- } \
- } while (0)
-
-//
-
-/*
- * Poisk-1 doesn't have a mc6845 and always runs in graphics mode. Text mode is emulated by BIOS;
- * NMI is triggered on access to video memory and to mc6845 ports. Address and data are latched into:
- *
- * Port 28H (offset 0) -- lower 8 bits of address
- * Port 29H (offset 1) -- high -//- and mode bits
- * Port 2AH (offset 2) -- data
- */
-
-READ8_MEMBER(p1_state::p1_trap_r)
-{
- UINT8 data = m_video.trap[offset];
- DBG_LOG(1,"trap",("R %.2x $%02x\n", 0x28+offset, data));
- if (offset == 0)
- m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
- return data;
-}
-
-WRITE8_MEMBER(p1_state::p1_trap_w)
-{
- DBG_LOG(1,"trap",("W %.2x $%02x\n", 0x28+offset, data));
-}
-
-READ8_MEMBER(p1_state::p1_cga_r)
-{
- m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
- return 0;
-}
-
-WRITE8_MEMBER(p1_state::p1_cga_w)
-{
- UINT16 port = offset + 0x3d0;
-
- DBG_LOG(1,"cga",("W %.4x $%02x\n", port, data));
- m_video.trap[2] = data;
- m_video.trap[1] = 0xC0 | ((port >> 8) & 0x3f);
- m_video.trap[0] = port & 255;
- m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
-}
-
-WRITE8_MEMBER(p1_state::p1_vram_w)
-{
- DBG_LOG(1,"vram",("W %.4x $%02x\n", offset, data));
- if (m_video.videoram_base)
- m_video.videoram_base[offset] = data;
- m_video.trap[2] = data;
- m_video.trap[1] = 0x80 | ((offset >> 8) & 0x3f);
- m_video.trap[0] = offset & 255;
- m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
-}
-
-// CGA emulator
-/*
-068h D42 0..2 R, G, B XXX Foreground/Background color
- 3 NMI DISABLE NMI trap 1: Disabled 0: Enabled
- 4 PALETTE XXX Colour palette 0: XXX 1: XXX
- 5 I (INTENS) XXX Foreground/Background color intensity
- 6 DISPLAY BANK XXX Video RAM page
- 7 HIRES 1: 640x200 0: 320x200
-*/
-
-WRITE8_MEMBER(p1_state::p1_ppi2_porta_w)
-{
- address_space &space_prg = m_maincpu->space(AS_PROGRAM);
-
- DBG_LOG(1,"color_select_68",("W $%02x\n", data));
-
- // NMI DISABLE
- if (BIT(data, 3) != BIT(m_video.color_select_68, 3)) {
- if (BIT(data, 3)) {
- space_prg.install_readwrite_bank( 0xb8000, 0xbbfff, "bank11" );
- } else {
- space_prg.install_read_bank( 0xb8000, 0xbbfff, "bank11" );
- space_prg.install_write_handler( 0xb8000, 0xbbfff, WRITE8_DELEGATE(p1_state, p1_vram_w) );
- }
- }
- // DISPLAY BANK
- if (BIT(data, 6) != BIT(m_video.color_select_68, 6)) {
- if (BIT(data, 6))
- m_video.videoram = m_video.videoram_base.get() + 0x4000;
- else
- m_video.videoram = m_video.videoram_base.get();
- }
- // HIRES -- XXX
- if (BIT(data, 7) != BIT(m_video.color_select_68, 7)) {
- if (BIT(data, 7))
- machine().first_screen()->set_visible_area(0, 640-1, 0, 200-1);
- else
- machine().first_screen()->set_visible_area(0, 320-1, 0, 200-1);
- }
- m_video.color_select_68 = data;
- set_palette_luts();
-}
-
-/*
-06Ah Dxx 6 Enable/Disable color burst (?)
- 7 Enable/Disable D7H/D7L
-*/
-
-WRITE8_MEMBER(p1_state::p1_ppi_portc_w)
-{
- DBG_LOG(1,"mode_control_6a",("W $%02x\n", data));
-
- m_video.mode_control_6a = data;
- set_palette_luts();
-}
-
-void p1_state::set_palette_luts(void)
-{
- /* Setup 2bpp palette lookup table */
- // HIRES
- if ( m_video.color_select_68 & 0x80 )
- {
- m_video.palette_lut_2bpp[0] = 0;
- }
- else
- {
- m_video.palette_lut_2bpp[0] = BG_COLOR(m_video.color_select_68);
- }
- // B&W -- XXX
-/*
- if ( m_video.mode_control_6a & 0x40 )
- {
- m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 3;
- m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 4;
- m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 7;
- }
- else
-*/
- {
- // PALETTE
- if ( m_video.color_select_68 & 0x20 )
- {
- m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 3;
- m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 5;
- m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 7;
- }
- else
- {
- m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 2;
- m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 4;
- m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 6;
- }
- }
-}
-
-/***************************************************************************
- Draw graphics mode with 320x200 pixels (default) with 2 bits/pixel.
- Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000
- cga fetches 2 byte per mc6845 access.
-***************************************************************************/
-
-POISK1_UPDATE_ROW( p1_state::cga_gfx_2bpp_update_row )
-{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT32 *p = &bitmap.pix32(ra);
- UINT16 odd, offset;
- int i;
-
- if ( ra == 0 ) DBG_LOG(1,"cga_gfx_2bpp_update_row",("\n"));
- odd = ( ra & 1 ) << 13;
- offset = ( ma & 0x1fff ) | odd;
- for ( i = 0; i < stride; i++ )
- {
- UINT8 data = videoram[ offset++ ];
-
- *p = palette[m_video.palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]]; p++;
- *p = palette[m_video.palette_lut_2bpp[ ( data >> 4 ) & 0x03 ]]; p++;
- *p = palette[m_video.palette_lut_2bpp[ ( data >> 2 ) & 0x03 ]]; p++;
- *p = palette[m_video.palette_lut_2bpp[ data & 0x03 ]]; p++;
- }
-}
-
-/***************************************************************************
- Draw graphics mode with 640x200 pixels (default).
- The cell size is 1x1 (1 scanline is the real default)
- Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000
-***************************************************************************/
-
-POISK1_UPDATE_ROW( p1_state::cga_gfx_1bpp_update_row )
-{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT32 *p = &bitmap.pix32(ra);
- UINT8 fg = 15, bg = BG_COLOR(m_video.color_select_68);
- UINT16 odd, offset;
- int i;
-
- if ( ra == 0 ) DBG_LOG(1,"cga_gfx_1bpp_update_row",("bg %d\n", bg));
- odd = ( ra & 1 ) << 13;
- offset = ( ma & 0x1fff ) | odd;
- for ( i = 0; i < stride; i++ )
- {
- UINT8 data = videoram[ offset++ ];
-
- *p = palette[( data & 0x80 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x40 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x20 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x10 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x08 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x04 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x02 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x01 ) ? fg : bg ]; p++;
- }
-}
-
-/***************************************************************************
- Draw graphics mode with 640x200 pixels + extra highlight color for text
- mode emulation
- Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000
-***************************************************************************/
-
-POISK1_UPDATE_ROW( p1_state::poisk1_gfx_1bpp_update_row )
-{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT32 *p = &bitmap.pix32(ra);
- UINT8 fg, bg = BG_COLOR(m_video.color_select_68);
- UINT16 odd, offset;
- int i;
-
- if ( ra == 0 ) DBG_LOG(1,"poisk1_gfx_1bpp_update_row",("bg %d\n", bg));
- odd = ( ra & 1 ) << 13;
- offset = ( ma & 0x1fff ) | odd;
- for ( i = 0; i < stride; i++ )
- {
- UINT8 data = videoram[ offset++ ];
-
- fg = (data & 0x80) ? ( (m_video.color_select_68 & 0x20) ? 10 : 11 ) : 15; // XXX
- *p = palette[bg]; p++;
- *p = palette[( data & 0x40 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x20 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x10 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x08 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x04 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x02 ) ? fg : bg ]; p++;
- *p = palette[( data & 0x01 ) ? fg : bg ]; p++;
- }
-}
-
-/* Initialise the cga palette */
-PALETTE_INIT_MEMBER(p1_state, p1)
-{
- int i;
-
- DBG_LOG(0,"init",("palette_init()\n"));
-
- for ( i = 0; i < CGA_PALETTE_SETS * 16; i++ )
- {
- palette.set_pen_color(i, cga_palette[i][0], cga_palette[i][1], cga_palette[i][2] );
- }
-}
-
-void p1_state::video_start()
-{
- address_space &space = m_maincpu->space( AS_PROGRAM );
-
- DBG_LOG(0,"init",("video_start()\n"));
-
- memset(&m_video, 0, sizeof(m_video));
- m_video.videoram_base = std::make_unique<UINT8[]>(0x8000);
- m_video.videoram = m_video.videoram_base.get();
- m_video.stride = 80;
-
- space.install_readwrite_bank(0xb8000, 0xbffff, "bank11" );
- machine().root_device().membank("bank11")->set_base(m_video.videoram);
-}
-
-UINT32 p1_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
-{
- UINT16 ra, ma = 0;
-
- if (!m_video.stride || !m_video.videoram) return 0;
-
- // bit 6 of 6Ah disables color burst -- not implemented
- for (ra = cliprect.min_y; ra <= cliprect.max_y; ra++)
- {
- if (BIT(m_video.color_select_68, 7)) {
- if (BIT(m_video.mode_control_6a, 7)) {
- cga_gfx_1bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride);
- } else {
- poisk1_gfx_1bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride);
- }
- } else {
- cga_gfx_2bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride);
- }
- if (ra & 1) ma += m_video.stride;
- }
-
- return 0;
-}
diff --git a/src/mame/video/popper.cpp b/src/mame/video/popper.cpp
deleted file mode 100644
index ccabc1263f5..00000000000
--- a/src/mame/video/popper.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-// license:???
-// copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli
-/***************************************************************************
-
- Popper
-
- Omori Electric CAD (OEC) 1983
-
-***************************************************************************/
-
-#include "emu.h"
-#include "video/resnet.h"
-#include "includes/popper.h"
-
-
-/***************************************************************************
- *
- * Color guns - from schematics
- *
- ***************************************************************************/
-
-static const res_net_decode_info popper_decode_info =
-{
- 1, // there may be two proms needed to construct color
- 0, // start at 0
- 63, // end at 255
- // R, G, B,
- { 0, 0, 0, }, // offsets
- { 0, 3, 6, }, // shifts
- {0x07,0x07,0x03, } // masks
-};
-
-static const res_net_info popper_net_info =
-{
- RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_TTL_OUT,
- {
- { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } },
- { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } },
- { RES_NET_AMP_NONE, 0, 0, 2, { 470, 220, 0 } }
- }
-};
-
-PALETTE_INIT_MEMBER(popper_state, popper)
-{
- const UINT8 *color_prom = memregion("proms")->base();
- std::vector<rgb_t> rgb;
-
- compute_res_net_all(rgb, color_prom, popper_decode_info, popper_net_info);
- palette.set_pen_colors(0, rgb);
- palette.palette()->normalize_range(0, 63);
-}
-
-WRITE8_MEMBER(popper_state::popper_ol_videoram_w)
-{
- m_ol_videoram[offset] = data;
- m_ol_p123_tilemap->mark_tile_dirty(offset);
- m_ol_p0_tilemap->mark_tile_dirty(offset);
-}
-
-WRITE8_MEMBER(popper_state::popper_videoram_w)
-{
- m_videoram[offset] = data;
- m_p123_tilemap->mark_tile_dirty(offset);
- m_p0_tilemap->mark_tile_dirty(offset);
-}
-
-WRITE8_MEMBER(popper_state::popper_ol_attribram_w)
-{
- m_ol_attribram[offset] = data;
- m_ol_p123_tilemap->mark_tile_dirty(offset);
- m_ol_p0_tilemap->mark_tile_dirty(offset);
-}
-
-WRITE8_MEMBER(popper_state::popper_attribram_w)
-{
- m_attribram[offset] = data;
- m_p123_tilemap->mark_tile_dirty(offset);
- m_p0_tilemap->mark_tile_dirty(offset);
-}
-
-WRITE8_MEMBER(popper_state::popper_flipscreen_w)
-{
- m_flipscreen = data;
- machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0);
-
- if (m_flipscreen)
- m_tilemap_clip.min_x = m_tilemap_clip.max_x - 15;
- else
- m_tilemap_clip.max_x = 15;
-}
-
-WRITE8_MEMBER(popper_state::popper_e002_w)
-{
- m_e002 = data;
-}
-
-WRITE8_MEMBER(popper_state::popper_gfx_bank_w)
-{
- if (m_gfx_bank != data)
- {
- m_gfx_bank = data;
- machine().tilemap().mark_all_dirty();
- }
-}
-
-TILE_GET_INFO_MEMBER(popper_state::get_popper_p123_tile_info)
-{
- UINT32 tile_number = m_videoram[tile_index];
- UINT8 attr = m_attribram[tile_index];
- tile_number += m_gfx_bank << 8;
-
- SET_TILE_INFO_MEMBER(0,
- tile_number,
- (attr & 0xf),
- 0);
- tileinfo.group = (attr & 0x80) >> 7;
-}
-
-TILE_GET_INFO_MEMBER(popper_state::get_popper_p0_tile_info)
-{
- UINT32 tile_number = m_videoram[tile_index];
- UINT8 attr = m_attribram[tile_index];
- tile_number += m_gfx_bank << 8;
-
- //pen 0 only in front if colour set as well
- tileinfo.group = (attr & 0x70) ? ((attr & 0x80) >> 7) : 0;
-
- SET_TILE_INFO_MEMBER(0,
- tile_number,
- ((attr & 0x70) >> 4) + 8,
- 0);
-}
-
-TILE_GET_INFO_MEMBER(popper_state::get_popper_ol_p123_tile_info)
-{
- UINT32 tile_number = m_ol_videoram[tile_index];
- UINT8 attr = m_ol_attribram[tile_index];
- tile_number += m_gfx_bank << 8;
-
- SET_TILE_INFO_MEMBER(0,
- tile_number,
- (attr & 0xf),
- 0);
- tileinfo.group = (attr & 0x80) >> 7;
-}
-
-TILE_GET_INFO_MEMBER(popper_state::get_popper_ol_p0_tile_info)
-{
- UINT32 tile_number = m_ol_videoram[tile_index];
- UINT8 attr = m_ol_attribram[tile_index];
- tile_number += m_gfx_bank << 8;
-
- //pen 0 only in front if colour set as well
- tileinfo.group = (attr & 0x70) ? ((attr & 0x80) >> 7) : 0;
-
- SET_TILE_INFO_MEMBER(0,
- tile_number,
- ((attr & 0x70) >> 4) + 8,
- 0);
-}
-
-void popper_state::video_start()
-{
- m_p123_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popper_state::get_popper_p123_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 33, 32 );
- m_p0_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popper_state::get_popper_p0_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 33, 32);
- m_ol_p123_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popper_state::get_popper_ol_p123_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 2, 32);
- m_ol_p0_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popper_state::get_popper_ol_p0_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 2, 32);
-
- m_p123_tilemap->set_transmask(0, 0x0f, 0x01);
- m_p123_tilemap->set_transmask(1, 0x01, 0x0f);
- m_p0_tilemap->set_transmask(0, 0x0f, 0x0e);
- m_p0_tilemap->set_transmask(1, 0x0e, 0x0f);
- m_ol_p123_tilemap->set_transmask(0, 0x0f, 0x01);
- m_ol_p123_tilemap->set_transmask(1, 0x01, 0x0f);
- m_ol_p0_tilemap->set_transmask(0, 0x0f, 0x0e);
- m_ol_p0_tilemap->set_transmask(1, 0x0e, 0x0f);
-
- m_tilemap_clip = m_screen->visible_area();
-}
-
-void popper_state::draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect )
-{
- int offs, sx, sy, flipx, flipy;
-
- for (offs = 0; offs < m_spriteram.bytes() - 4; offs += 4)
- {
- //if y position is in the current strip
- if (m_spriteram[offs + 1] && (((m_spriteram[offs] + (m_flipscreen ? 2 : 0)) & 0xf0) == (0x0f - offs / 0x80) << 4))
- {
- //offs y pos
- //offs+1 sprite number
- //offs+2
- //76543210
- //x------- flipy
- //-x------ flipx
- //--xx---- unused
- //----xxxx colour
- //offs+3 x pos
-
- sx = m_spriteram[offs + 3];
- sy = 240 - m_spriteram[offs];
- flipx = (m_spriteram[offs + 2] & 0x40) >> 6;
- flipy = (m_spriteram[offs + 2] & 0x80) >> 7;
-
- if (m_flipscreen)
- {
- sx = 248 - sx;
- sy = 242 - sy;
- flipx = !flipx;
- flipy = !flipy;
- }
-
- m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
- m_spriteram[offs + 1],
- (m_spriteram[offs + 2] & 0x0f),
- flipx,flipy,
- sx,sy,0);
- }
- }
-}
-
-UINT32 popper_state::screen_update_popper(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- rectangle finalclip = m_tilemap_clip;
- finalclip &= cliprect;
-
- //attribram
- //76543210
- //x------- draw over sprites
- //-xxx---- colour for pen 0 (from second prom?)
- //----xxxx colour for pens 1,2,3
-
- m_p123_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0);
- m_p0_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0);
- m_ol_p123_tilemap->draw(screen, bitmap, finalclip, TILEMAP_DRAW_LAYER1, 0);
- m_ol_p0_tilemap->draw(screen, bitmap, finalclip, TILEMAP_DRAW_LAYER1, 0);
-
- draw_sprites(bitmap, cliprect);
-
- m_p123_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0);
- m_p0_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0);
- m_ol_p123_tilemap->draw(screen, bitmap, finalclip, TILEMAP_DRAW_LAYER0, 0);
- m_ol_p0_tilemap->draw(screen, bitmap, finalclip, TILEMAP_DRAW_LAYER0, 0);
- return 0;
-}
diff --git a/src/mame/video/qdrmfgp.cpp b/src/mame/video/qdrmfgp.cpp
index ce98f259cc0..b86c9e12b5d 100644
--- a/src/mame/video/qdrmfgp.cpp
+++ b/src/mame/video/qdrmfgp.cpp
@@ -1,5 +1,5 @@
-// license:???
-// copyright-holders:Eisuke Watanabe
+// license:BSD-3-Clause
+// copyright-holders:Hau
/***************************************************************************
video.c
diff --git a/src/mame/video/snk68_spr.h b/src/mame/video/snk68_spr.h
index 8a0494e0a7b..088b6a97a45 100644
--- a/src/mame/video/snk68_spr.h
+++ b/src/mame/video/snk68_spr.h
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Bryan McPhail, Acho A. Tang, Nicola Salmoria
typedef device_delegate<void (int&, int&, int&, int&)> snk68_tile_indirection_delegate;
#define MCFG_SNK68_SPR_GFXDECODE(_gfxtag) \
diff --git a/src/mame/video/sprcros2.cpp b/src/mame/video/sprcros2.cpp
deleted file mode 100644
index a64da9bfafc..00000000000
--- a/src/mame/video/sprcros2.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-// license:???
-// copyright-holders:insideoutboy
-/*
-Super Cross II (JPN Ver.)
-(c)1986 GM Shoji
-*/
-
-#include "emu.h"
-#include "includes/sprcros2.h"
-
-
-PALETTE_INIT_MEMBER(sprcros2_state, sprcros2)
-{
- const UINT8 *color_prom = memregion("proms")->base();
- int i;
-
- /* create a lookup table for the palette */
- for (i = 0; i < 0x20; i++)
- {
- int bit0, bit1, bit2;
- int r, g, b;
-
- /* red component */
- bit0 = (color_prom[i] >> 0) & 0x01;
- bit1 = (color_prom[i] >> 1) & 0x01;
- bit2 = (color_prom[i] >> 2) & 0x01;
- r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
-
- /* green component */
- bit0 = (color_prom[i] >> 3) & 0x01;
- bit1 = (color_prom[i] >> 4) & 0x01;
- bit2 = (color_prom[i] >> 5) & 0x01;
- g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
-
- /* blue component */
- bit0 = (color_prom[i] >> 6) & 0x01;
- bit1 = (color_prom[i] >> 7) & 0x01;
- b = 0x47 * bit0 + 0xb8 * bit1;
- palette.set_pen_color(i,rgb_t(r,g,b));
-
- palette.set_indirect_color(i, rgb_t(r, g, b));
- }
-
- /* color_prom now points to the beginning of the lookup table */
- color_prom += 0x20;
-
- /* bg */
- for (i = 0; i < 0x100; i++)
- {
- UINT8 ctabentry = (color_prom[i] & 0x0f) | ((color_prom[i + 0x100] & 0x0f) << 4);
- palette.set_pen_indirect(i, ctabentry);
- }
-
- /* sprites & fg */
- for (i = 0x100; i < 0x300; i++)
- {
- UINT8 ctabentry = color_prom[i + 0x100];
- palette.set_pen_indirect(i, ctabentry);
- }
-}
-
-WRITE8_MEMBER(sprcros2_state::fgvideoram_w)
-{
- m_fgvideoram[offset] = data;
- m_fgtilemap->mark_tile_dirty(offset&0x3ff);
-}
-
-WRITE8_MEMBER(sprcros2_state::bgvideoram_w)
-{
- m_bgvideoram[offset] = data;
- m_bgtilemap->mark_tile_dirty(offset&0x3ff);
-}
-
-WRITE8_MEMBER(sprcros2_state::bgscrollx_w)
-{
- if(m_port7&0x02)
- m_bgtilemap->set_scrollx(0, 0x100-data);
- else
- m_bgtilemap->set_scrollx(0, data);
-}
-
-WRITE8_MEMBER(sprcros2_state::bgscrolly_w)
-{
- m_bgtilemap->set_scrolly(0, data);
-}
-
-TILE_GET_INFO_MEMBER(sprcros2_state::get_bgtile_info)
-{
- UINT32 tile_number = m_bgvideoram[tile_index];
- UINT8 attr = m_bgvideoram[tile_index + 0x400];
-
- //attr
- //76543210
- //xxxx---- colour
- //----x--- flipx
- //-----xxx tile bank
-
- tile_number += (attr&0x07)<<8;
-
- SET_TILE_INFO_MEMBER(0,
- tile_number,
- (attr&0xf0)>>4,
- (attr&0x08)?TILE_FLIPX:0);
-}
-
-TILE_GET_INFO_MEMBER(sprcros2_state::get_fgtile_info)
-{
- UINT32 tile_number = m_fgvideoram[tile_index];
- UINT8 attr = m_fgvideoram[tile_index + 0x400];
- int color = (attr&0xfc)>>2;
-
- tileinfo.group = color;
-
- //attr
- //76543210
- //xxxxxx-- colour
- //------xx tile bank
-
- tile_number += (attr&0x03)<<8;
-
- SET_TILE_INFO_MEMBER(2,
- tile_number,
- color,
- 0);
-}
-
-void sprcros2_state::video_start()
-{
- m_bgtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(sprcros2_state::get_bgtile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
- m_fgtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(sprcros2_state::get_fgtile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
-
- m_fgtilemap->configure_groups(*m_gfxdecode->gfx(2), 0);
-}
-
-void sprcros2_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect)
-{
- int offs,sx,sy,color,flipx,flipy;
-
- for (offs = m_spriteram.bytes()-4; offs >= 0; offs -= 4)
- {
- if (m_spriteram[offs])
- {
- //offs
- //76543210
- //x------- unused
- //-xxxxxxx sprite number
- //offs+1
- //76543210
- //xx------ unused
- //--xxx--- colour (6/7 unused and blank in prom)
- //-----x-- unused
- //------x- flipx
- //-------x unused
- //offs+2 y pos
- //offs+3 x pos
-
- sx = ((m_spriteram[offs+3]+0x10)%0x100)-0x10;
- sy = 225-(((m_spriteram[offs+2]+0x10)%0x100)-0x10);
- color = (m_spriteram[offs+1]&0x38)>>3;
- flipx = m_spriteram[offs+1]&0x02;
- flipy = 0;
-
- if (m_port7&0x02)
- {
- sx = 224-sx;
- sy = 224-sy;
- flipx = !flipx;
- flipy = !flipy;
- }
-
- m_gfxdecode->gfx(1)->transmask(bitmap,cliprect,
- m_spriteram[offs],
- color,
- flipx,flipy,
- sx,sy,
- m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, 0));
- }
- }
-}
-
-UINT32 sprcros2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- m_bgtilemap->draw(screen, bitmap, cliprect, 0, 0);
- draw_sprites(bitmap, cliprect);
- m_fgtilemap->draw(screen, bitmap, cliprect, 0, 0);
- return 0;
-}
diff --git a/src/mame/video/suprnova.cpp b/src/mame/video/suprnova.cpp
index ecacd5b26be..5e4249470fa 100644
--- a/src/mame/video/suprnova.cpp
+++ b/src/mame/video/suprnova.cpp
@@ -8,7 +8,7 @@
/* draws ROZ with linescroll OR columnscroll to 16-bit indexed bitmap */
-void skns_state::suprnova_draw_roz(bitmap_ind16 &bitmap, bitmap_ind8& bitmapflags, const rectangle &cliprect, tilemap_t *tmap, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, int columnscroll, UINT32* scrollram)
+void skns_state::draw_roz(bitmap_ind16 &bitmap, bitmap_ind8& bitmapflags, const rectangle &cliprect, tilemap_t *tmap, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, int columnscroll, UINT32* scrollram)
{
//bitmap_ind16 *destbitmap = bitmap;
bitmap_ind16 &srcbitmap = tmap->pixmap();
@@ -89,7 +89,7 @@ void skns_state::suprnova_draw_roz(bitmap_ind16 &bitmap, bitmap_ind8& bitmapflag
}
-WRITE32_MEMBER(skns_state::skns_pal_regs_w)
+WRITE32_MEMBER(skns_state::pal_regs_w)
{
COMBINE_DATA(&m_pal_regs[offset]);
m_palette_updated =1;
@@ -176,7 +176,7 @@ WRITE32_MEMBER(skns_state::skns_pal_regs_w)
}
-WRITE32_MEMBER(skns_state::skns_palette_ram_w)
+WRITE32_MEMBER(skns_state::palette_ram_w)
{
int r,g,b;
int brightness_r, brightness_g, brightness_b/*, alpha*/;
@@ -291,7 +291,7 @@ TILE_GET_INFO_MEMBER(skns_state::get_tilemap_A_tile_info)
//if (pri) popmessage("pri A!! %02x\n", pri);
}
-WRITE32_MEMBER(skns_state::skns_tilemapA_w)
+WRITE32_MEMBER(skns_state::tilemapA_w)
{
COMBINE_DATA(&m_tilemapA_ram[offset]);
m_tilemap_A->mark_tile_dirty(offset);
@@ -317,13 +317,13 @@ TILE_GET_INFO_MEMBER(skns_state::get_tilemap_B_tile_info)
//if (pri) popmessage("pri B!! %02x\n", pri); // 02 on cyvern
}
-WRITE32_MEMBER(skns_state::skns_tilemapB_w)
+WRITE32_MEMBER(skns_state::tilemapB_w)
{
COMBINE_DATA(&m_tilemapB_ram[offset]);
m_tilemap_B->mark_tile_dirty(offset);
}
-WRITE32_MEMBER(skns_state::skns_v3_regs_w)
+WRITE32_MEMBER(skns_state::v3_regs_w)
{
COMBINE_DATA(&m_v3_regs[offset]);
@@ -361,6 +361,29 @@ void skns_state::video_start()
m_gfxdecode->gfx(2)->set_granularity(256);
m_gfxdecode->gfx(3)->set_granularity(256);
+
+
+ save_item(NAME(m_depthA));
+ save_item(NAME(m_depthB));
+ save_item(NAME(m_use_spc_bright));
+ save_item(NAME(m_use_v3_bright));
+ save_item(NAME(m_bright_spc_b));
+ save_item(NAME(m_bright_spc_g));
+ save_item(NAME(m_bright_spc_r));
+ save_item(NAME(m_bright_spc_b_trans));
+ save_item(NAME(m_bright_spc_g_trans));
+ save_item(NAME(m_bright_spc_r_trans));
+ save_item(NAME(m_bright_v3_b));
+ save_item(NAME(m_bright_v3_g));
+ save_item(NAME(m_bright_v3_r));
+ save_item(NAME(m_bright_v3_b_trans));
+ save_item(NAME(m_bright_v3_g_trans));
+ save_item(NAME(m_bright_v3_r_trans));
+ save_item(NAME(m_spc_changed));
+ save_item(NAME(m_v3_changed));
+ save_item(NAME(m_palette_updated));
+ save_item(NAME(m_alt_enable_background));
+ save_item(NAME(m_alt_enable_sprites));
}
void skns_state::video_reset()
@@ -376,7 +399,7 @@ void skns_state::video_reset()
m_alt_enable_background = m_alt_enable_sprites = 1;
}
-void skns_state::supernova_draw_a( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran )
+void skns_state::draw_a( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran )
{
int enable_a = (m_v3_regs[0x10/4] >> 0) & 0x0001;
int nowrap_a = (m_v3_regs[0x10/4] >> 0) & 0x0004;
@@ -401,12 +424,12 @@ void skns_state::supernova_draw_a( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_fla
columnscroll = (m_v3_regs[0x0c/4] >> 1) & 0x0001;
- suprnova_draw_roz(bitmap,bitmap_flags,cliprect, m_tilemap_A, startx << 8,starty << 8, incxx << 8,incxy << 8,incyx << 8,incyy << 8, !nowrap_a, columnscroll, &m_v3slc_ram[0]);
+ draw_roz(bitmap,bitmap_flags,cliprect, m_tilemap_A, startx << 8,starty << 8, incxx << 8,incxy << 8,incyx << 8,incyy << 8, !nowrap_a, columnscroll, &m_v3slc_ram[0]);
//tilemap_copy_bitmap(bitmap, m_tilemap_bitmap_lower, m_tilemap_bitmapflags_lower);
}
}
-void skns_state::supernova_draw_b( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran )
+void skns_state::draw_b( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran )
{
int enable_b = (m_v3_regs[0x34/4] >> 0) & 0x0001;
int nowrap_b = (m_v3_regs[0x34/4] >> 0) & 0x0004;
@@ -429,14 +452,14 @@ void skns_state::supernova_draw_b( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_fla
incxx = m_v3_regs[0x48/4]&0x7ffff;
if (incxx&0x40000) incxx = incxx-0x80000;
columnscroll = (m_v3_regs[0x0c/4] >> 9) & 0x0001; // selects column scroll or rowscroll
- suprnova_draw_roz(bitmap,bitmap_flags, cliprect, m_tilemap_B, startx << 8,starty << 8, incxx << 8,incxy << 8,incyx << 8,incyy << 8, !nowrap_b, columnscroll, &m_v3slc_ram[0x1000/4]);
+ draw_roz(bitmap,bitmap_flags, cliprect, m_tilemap_B, startx << 8,starty << 8, incxx << 8,incxy << 8,incyx << 8,incyy << 8, !nowrap_b, columnscroll, &m_v3slc_ram[0x1000/4]);
//popmessage("%08x %08x %08x %08x %08x %08x", startx, starty, incxx, incyy, incxy, incyx);
}
}
-UINT32 skns_state::screen_update_skns(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+UINT32 skns_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
palette_update();
@@ -457,8 +480,8 @@ UINT32 skns_state::screen_update_skns(screen_device &screen, bitmap_rgb32 &bitma
//popmessage("pri %d %d\n", supernova_pri_a, supernova_pri_b);
/*if (!supernova_pri_b) { */
- supernova_draw_b(m_tilemap_bitmap_lower, m_tilemap_bitmapflags_lower, cliprect,tran);// tran = 1;
- supernova_draw_a(m_tilemap_bitmap_higher,m_tilemap_bitmapflags_higher,cliprect,tran);// tran = 1;
+ draw_b(m_tilemap_bitmap_lower, m_tilemap_bitmapflags_lower, cliprect,tran);// tran = 1;
+ draw_a(m_tilemap_bitmap_higher,m_tilemap_bitmapflags_higher,cliprect,tran);// tran = 1;
{
int x,y;
@@ -615,7 +638,3 @@ UINT32 skns_state::screen_update_skns(screen_device &screen, bitmap_rgb32 &bitma
return 0;
}
-
-void skns_state::screen_eof_skns(screen_device &screen, bool state)
-{
-}
diff --git a/src/mame/video/tecmo16.cpp b/src/mame/video/tecmo16.cpp
index 7a49c8c705a..c1ca267b720 100644
--- a/src/mame/video/tecmo16.cpp
+++ b/src/mame/video/tecmo16.cpp
@@ -1,5 +1,5 @@
-// license:???
-// copyright-holders:Eisuke Watanabe, Nicola Salmoria
+// license:BSD-3-Clause
+// copyright-holders:Hau, Nicola Salmoria
/******************************************************************************
Ganbare Ginkun (Japan) (c)1995 TECMO
diff --git a/src/mame/video/toypop.cpp b/src/mame/video/toypop.cpp
deleted file mode 100644
index 296da8daaf8..00000000000
--- a/src/mame/video/toypop.cpp
+++ /dev/null
@@ -1,275 +0,0 @@
-// license:???
-// copyright-holders:Edgardo E. Contini Salvan
-/***************************************************************************
-
- video.c
-
- Functions to emulate the video hardware of the machine.
-
-***************************************************************************/
-
-#include "emu.h"
-#include "includes/toypop.h"
-
-/***************************************************************************
-
- Convert the color PROMs into a more useable format.
-
- toypop has three 256x4 palette PROM and two 256x8 color lookup table PROMs
- (one for characters, one for sprites).
-
-***************************************************************************/
-
-PALETTE_INIT_MEMBER(toypop_state, toypop)
-{
- const UINT8 *color_prom = memregion("proms")->base();
-
- for (int i = 0;i < 256;i++)
- {
- int bit0,bit1,bit2,bit3,r,g,b;
-
- // red component
- bit0 = (color_prom[i] >> 0) & 0x01;
- bit1 = (color_prom[i] >> 1) & 0x01;
- bit2 = (color_prom[i] >> 2) & 0x01;
- bit3 = (color_prom[i] >> 3) & 0x01;
- r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- // green component
- bit0 = (color_prom[i+0x100] >> 0) & 0x01;
- bit1 = (color_prom[i+0x100] >> 1) & 0x01;
- bit2 = (color_prom[i+0x100] >> 2) & 0x01;
- bit3 = (color_prom[i+0x100] >> 3) & 0x01;
- g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- // blue component
- bit0 = (color_prom[i+0x200] >> 0) & 0x01;
- bit1 = (color_prom[i+0x200] >> 1) & 0x01;
- bit2 = (color_prom[i+0x200] >> 2) & 0x01;
- bit3 = (color_prom[i+0x200] >> 3) & 0x01;
- b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
-
- palette.set_indirect_color(i, rgb_t(r,g,b));
- }
-
- for (int i = 0;i < 256;i++)
- {
- UINT8 entry;
-
- // characters
- palette.set_pen_indirect(i + 0*256, (color_prom[i + 0x300] & 0x0f) | 0x70);
- palette.set_pen_indirect(i + 1*256, (color_prom[i + 0x300] & 0x0f) | 0xf0);
- // sprites
- entry = color_prom[i + 0x500];
- palette.set_pen_indirect(i + 2*256, entry);
- }
- for (int i = 0;i < 16;i++)
- {
- // background
- palette.set_pen_indirect(i + 3*256 + 0*16, 0x60 + i);
- palette.set_pen_indirect(i + 3*256 + 1*16, 0xe0 + i);
- }
-}
-
-
-
-/***************************************************************************
-
- Callbacks for the TileMap code
-
-***************************************************************************/
-
-/* convert from 32x32 to 36x28 */
-TILEMAP_MAPPER_MEMBER(toypop_state::tilemap_scan)
-{
- int offs;
-
- row += 2;
- col -= 2;
- if (col & 0x20)
- offs = row + ((col & 0x1f) << 5);
- else
- offs = col + (row << 5);
-
- return offs;
-}
-
-TILE_GET_INFO_MEMBER(toypop_state::get_tile_info)
-{
- UINT8 attr = m_videoram[tile_index + 0x400];
- SET_TILE_INFO_MEMBER(0,
- m_videoram[tile_index],
- (attr & 0x3f) + 0x40 * m_palettebank,
- 0);
-}
-
-
-
-/***************************************************************************
-
- Start the video hardware emulation.
-
-***************************************************************************/
-
-void toypop_state::video_start()
-{
- m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(toypop_state::get_tile_info),this), tilemap_mapper_delegate(FUNC(toypop_state::tilemap_scan),this),8,8,36,28);
-
- m_bg_tilemap->set_transparent_pen(0);
-}
-
-
-
-/***************************************************************************
-
- Memory handlers
-
-***************************************************************************/
-
-WRITE8_MEMBER(toypop_state::toypop_videoram_w)
-{
- m_videoram[offset] = data;
- m_bg_tilemap->mark_tile_dirty(offset & 0x3ff);
-}
-
-WRITE8_MEMBER(toypop_state::toypop_palettebank_w)
-{
- if (m_palettebank != (offset & 1))
- {
- m_palettebank = offset & 1;
- machine().tilemap().mark_all_dirty();
- }
-}
-
-WRITE16_MEMBER(toypop_state::toypop_flipscreen_w)
-{
- m_bitmapflip = offset & 1;
-}
-
-READ16_MEMBER(toypop_state::toypop_merged_background_r)
-{
- int data1, data2;
-
- // 0x0a0b0c0d is read as 0xabcd
- data1 = m_bg_image[2*offset];
- data2 = m_bg_image[2*offset + 1];
- return ((data1 & 0xf00) << 4) | ((data1 & 0xf) << 8) | ((data2 & 0xf00) >> 4) | (data2 & 0xf);
-}
-
-WRITE16_MEMBER(toypop_state::toypop_merged_background_w)
-{
- // 0xabcd is written as 0x0a0b0c0d in the background image
- if (ACCESSING_BITS_8_15)
- m_bg_image[2*offset] = ((data & 0xf00) >> 8) | ((data & 0xf000) >> 4);
-
- if (ACCESSING_BITS_0_7)
- m_bg_image[2*offset+1] = (data & 0xf) | ((data & 0xf0) << 4);
-}
-
-void toypop_state::draw_background(bitmap_ind16 &bitmap)
-{
- pen_t pen_base = 0x300 + 0x10*m_palettebank;
-
- // copy the background image from RAM (0x190200-0x19FDFF) to bitmap
- if (m_bitmapflip)
- {
- int offs = 0xFDFE/2;
- for (int y = 0; y < 224; y++)
- {
- UINT16 *scanline = &bitmap.pix16(y);
- for (int x = 0; x < 288; x+=2)
- {
- UINT16 data = m_bg_image[offs];
- scanline[x] = pen_base | (data & 0x0f);
- scanline[x+1] = pen_base | (data >> 8);
- offs--;
- }
- }
- }
- else
- {
- int offs = 0x200/2;
- for (int y = 0; y < 224; y++)
- {
- UINT16 *scanline = &bitmap.pix16(y);
- for (int x = 0; x < 288; x+=2)
- {
- UINT16 data = m_bg_image[offs];
- scanline[x] = pen_base | (data >> 8);
- scanline[x+1] = pen_base | (data & 0x0f);
- offs++;
- }
- }
- }
-}
-
-
-
-/***************************************************************************
-
- Display refresh
-
-***************************************************************************/
-
-
-void toypop_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 *spriteram_base)
-{
- UINT8 *spriteram = spriteram_base + 0x780;
- UINT8 *spriteram_2 = spriteram + 0x800;
- UINT8 *spriteram_3 = spriteram_2 + 0x800;
- enum { xoffs = -31, yoffs = -8 };
- int flip = flip_screen();
-
- for (int offs = 0;offs < 0x80;offs += 2)
- {
- /* is it on? */
- if ((spriteram_3[offs+1] & 2) == 0)
- {
- static const UINT8 gfx_offs[2][2] =
- {
- { 0, 1 },
- { 2, 3 }
- };
- int sprite = spriteram[offs];
- int color = spriteram[offs+1];
- int sx = spriteram_2[offs+1] + 0x100 * (spriteram_3[offs+1] & 1) - 40 + xoffs;
- int sy = 256 - spriteram_2[offs] + yoffs + 1; // sprites are buffered and delayed by one scanline
- int flipx = (spriteram_3[offs] & 0x01);
- int flipy = (spriteram_3[offs] & 0x02) >> 1;
- int sizex = (spriteram_3[offs] & 0x04) >> 2;
- int sizey = (spriteram_3[offs] & 0x08) >> 3;
-
- sprite &= ~sizex;
- sprite &= ~(sizey << 1);
-
- sy -= 16 * sizey;
- sy = (sy & 0xff) - 32; // fix wraparound
-
- if (flip)
- {
- flipx ^= 1;
- flipy ^= 1;
- }
-
- for (int y = 0;y <= sizey;y++)
- {
- for (int x = 0;x <= sizex;x++)
- {
- m_gfxdecode->gfx(1)->transmask(bitmap,cliprect,
- sprite + gfx_offs[y ^ (sizey & flipy)][x ^ (sizex & flipx)],
- color,
- flipx,flipy,
- sx + 16*x,sy + 16*y,
- m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, 0xff));
- }
- }
- }
- }
-}
-
-
-UINT32 toypop_state::screen_update_toypop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- draw_background(bitmap);
- m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0);
- draw_sprites(bitmap, cliprect, m_spriteram);
- return 0;
-}
diff --git a/src/mame/video/yiear.cpp b/src/mame/video/yiear.cpp
index 5fa3cac6f7a..c45ec809c1c 100644
--- a/src/mame/video/yiear.cpp
+++ b/src/mame/video/yiear.cpp
@@ -1,5 +1,6 @@
-// license:???
-// copyright-holders:Enrique Sanchez
+// license:BSD-3-Clause
+// copyright-holders:Phil Stroffolino
+// thanks-to:Enrique Sanchez
/***************************************************************************
video.c
diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp
index 3894f25e1b4..43d4cbf6a6c 100644
--- a/src/osd/modules/input/input_sdl.cpp
+++ b/src/osd/modules/input/input_sdl.cpp
@@ -688,11 +688,20 @@ public:
int physical_stick;
for (physical_stick = 0; physical_stick < SDL_NumJoysticks(); physical_stick++)
{
- 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());
+ 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);
+ 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++)
diff --git a/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh b/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh
index ef0030b7519..c2fba95bdc6 100644
--- a/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh
+++ b/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh
@@ -1,4 +1,5 @@
-
+// license:BSD-3-Clause
+// copyright-holders:Sven Gothel
#pragma optimize (on)
#pragma debug (off)
diff --git a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh
index c739c16934e..97278c65df5 100644
--- a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh
+++ b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh
@@ -1,4 +1,5 @@
-
+// license:BSD-3-Clause
+// copyright-holders:Sven Gothel
#pragma optimize (on)
#pragma debug (off)
diff --git a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh
index d6c9f5e7f59..93cd172e0b1 100644
--- a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh
+++ b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh
@@ -1,4 +1,5 @@
-
+// license:BSD-3-Clause
+// copyright-holders:Sven Gothel
#pragma optimize (on)
#pragma debug (off)
diff --git a/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh b/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh
index 465aa610d59..9c8728d90b9 100644
--- a/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh
+++ b/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh
@@ -1,4 +1,5 @@
-
+// license:BSD-3-Clause
+// copyright-holders:Sven Gothel
#pragma optimize (on)
#pragma debug (off)
diff --git a/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh b/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh
index 0e5a4605ac8..eb3f902f93b 100644
--- a/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh
+++ b/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh
@@ -1,4 +1,5 @@
-
+// license:BSD-3-Clause
+// copyright-holders:Sven Gothel
#pragma optimize (on)
#pragma debug (off)
diff --git a/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh b/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh
index 14c05aaa844..3bc16870166 100644
--- a/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh
+++ b/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh
@@ -1,4 +1,5 @@
-
+// license:BSD-3-Clause
+// copyright-holders:Sven Gothel
#pragma optimize (on)
#pragma debug (off)
diff --git a/src/osd/modules/render/bgfx/statereader.cpp b/src/osd/modules/render/bgfx/statereader.cpp
index 93fb021be5c..0a459c60102 100644
--- a/src/osd/modules/render/bgfx/statereader.cpp
+++ b/src/osd/modules/render/bgfx/statereader.cpp
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
#include "statereader.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)
diff --git a/src/osd/modules/render/bgfx/statereader.h b/src/osd/modules/render/bgfx/statereader.h
index d32cf52c817..ce52536ca0a 100644
--- a/src/osd/modules/render/bgfx/statereader.h
+++ b/src/osd/modules/render/bgfx/statereader.h
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
#pragma once
#ifndef __DRAWBGFX_STATE_READER__
diff --git a/src/osd/modules/render/bgfx/writereader.cpp b/src/osd/modules/render/bgfx/writereader.cpp
index 5d6ca0fcf93..7fd36a03fda 100644
--- a/src/osd/modules/render/bgfx/writereader.cpp
+++ b/src/osd/modules/render/bgfx/writereader.cpp
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
#include <bgfx/bgfx.h>
#include "writereader.h"
diff --git a/src/osd/modules/render/bgfx/writereader.h b/src/osd/modules/render/bgfx/writereader.h
index 5210a8df286..bd43b5899f5 100644
--- a/src/osd/modules/render/bgfx/writereader.h
+++ b/src/osd/modules/render/bgfx/writereader.h
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
#pragma once
#ifndef __DRAWBGFX_WRITE_READER__
diff --git a/src/osd/modules/render/binpacker.h b/src/osd/modules/render/binpacker.h
index 696bd18eb7d..33f02dc2642 100644
--- a/src/osd/modules/render/binpacker.h
+++ b/src/osd/modules/render/binpacker.h
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
#pragma once
#ifndef __RECTPACKER_H__
diff --git a/src/osd/modules/render/drawbgfx.h b/src/osd/modules/render/drawbgfx.h
index 62e00dd7d1d..806bc651344 100644
--- a/src/osd/modules/render/drawbgfx.h
+++ b/src/osd/modules/render/drawbgfx.h
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
#pragma once
#ifndef __RENDER_BGFX__
diff --git a/src/osd/modules/sound/xaudio2_sound.cpp b/src/osd/modules/sound/xaudio2_sound.cpp
index 9dc3d0461be..8388cea521e 100644
--- a/src/osd/modules/sound/xaudio2_sound.cpp
+++ b/src/osd/modules/sound/xaudio2_sound.cpp
@@ -38,6 +38,13 @@
#include "emu.h"
#include "osdepend.h"
#include "emuopts.h"
+#if !defined(XAUDIO2_DLL)
+#if defined(UNICODE)
+#define XAUDIO2_DLL L"xaudio2_8.dll"
+#else
+#define XAUDIO2_DLL "xaudio2_8.dll"
+#endif
+#endif
//============================================================
// Constants
diff --git a/src/osd/osdcore.cpp b/src/osd/osdcore.cpp
index 206cb5ed642..fef7d0d0f7a 100644
--- a/src/osd/osdcore.cpp
+++ b/src/osd/osdcore.cpp
@@ -160,7 +160,7 @@ osd_ticks_t osd_ticks(void)
osd_ticks_t osd_ticks_per_second(void)
{
- return std::chrono::high_resolution_clock::period::den;
+ return std::chrono::high_resolution_clock::period::den / std::chrono::high_resolution_clock::period::num;
}
//============================================================
diff --git a/src/osd/sdl/aueffectutil.mm b/src/osd/sdl/aueffectutil.mm
index 45ca18d178e..531d814e987 100644
--- a/src/osd/sdl/aueffectutil.mm
+++ b/src/osd/sdl/aueffectutil.mm
@@ -1,3 +1,5 @@
+// license:BSD-3-Clause
+// copyright-holders:Vas Crabb
#import <AvailabilityMacros.h>
#import <AudioUnit/AudioUnit.h>
#import <AudioUnit/AUCocoaUIView.h>
diff --git a/src/osd/sdl/keymaps/km-be.txt b/src/osd/sdl/keymaps/km-be.txt
deleted file mode 100644
index 014f3f02fac..00000000000
--- a/src/osd/sdl/keymaps/km-be.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-# Keymap for Belgian AZERTY keyboard (Linux)
-ITEM_ID_TILDE SDLK_WORLD_18 0x31 0xb2 ²
-ITEM_ID_1 SDLK_AMPERSAND 0xa 0x26 &
-ITEM_ID_2 SDLK_WORLD_73 0xb 0xe9 é
-ITEM_ID_3 SDLK_QUOTEDBL 0xc 0x22 "
-ITEM_ID_4 SDLK_QUOTE 0xd 0x27 '
-ITEM_ID_5 SDLK_LEFTPAREN 0xe 0x28 (
-ITEM_ID_6 SDLK_WORLD_39 0xf 0xa7 §
-ITEM_ID_7 SDLK_WORLD_72 0x10 0xe8 è
-ITEM_ID_8 SDLK_EXCLAIM 0x11 0x21 !
-ITEM_ID_9 SDLK_WORLD_71 0x12 0xe7 ç
-ITEM_ID_0 SDLK_WORLD_64 0x13 0xe0 à
-ITEM_ID_MINUS SDLK_RIGHTPAREN 0x14 0x29 )
-ITEM_ID_EQUALS SDLK_MINUS 0x15 0x2d -
-ITEM_ID_OPENBRACE SDLK_CARET 0x22 0x5e ^
-ITEM_ID_CLOSEBRACE SDLK_DOLLAR 0x23 0x24 $
-ITEM_ID_COMMA SDLK_COMMA 0x3a 0x2c ,
-ITEM_ID_STOP SDLK_SEMICOLON 0x3b 0x3b ;
-ITEM_ID_SLASH SDLK_COLON 0x3c 0x3a :
-ITEM_ID_COLON SDLK_WORLD_89 0x30 0xf9 ù
-ITEM_ID_QUOTE SDLK_WORLD_53 0x33 0xb5 µ
-ITEM_ID_BACKSLASH SDLK_EQUALS 0x3d 0x3d =
-ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c <
diff --git a/src/osd/sdl/keymaps/km-ch.txt b/src/osd/sdl/keymaps/km-ch.txt
deleted file mode 100644
index a23545bf5c8..00000000000
--- a/src/osd/sdl/keymaps/km-ch.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-# Keymap file for a swiss keyboard (Linux)
-#
-#
-ITEM_ID_MINUS SDLK_QUOTE 0x14 0x27 '
-ITEM_ID_EQUALS SDLK_CARET 0x15 0x0 ^
-ITEM_ID_Y SDLK_z 0x1d 0x7a z
-ITEM_ID_OPENBRACE SDLK_WORLD_92 0x22 0xfc ü
-ITEM_ID_CLOSEBRACE SDLK_COMPOSE 0x23 0x0 "
-ITEM_ID_COLON SDLK_WORLD_86 0x2f 0xf6 ö
-ITEM_ID_QUOTE SDLK_WORLD_68 0x30 0xe4 ä
-ITEM_ID_TILDE SDLK_WORLD_7 0x31 0xa7 §
-ITEM_ID_BACKSLASH SDLK_LESS 0x5e 0x3c <
-ITEM_ID_Z SDLK_y 0x34 0x79 y
-ITEM_ID_SLASH SDLK_MINUS 0x3d 0x2d -
diff --git a/src/osd/sdl/keymaps/km-de.txt b/src/osd/sdl/keymaps/km-de.txt
deleted file mode 100644
index 5e5b75fa7e9..00000000000
--- a/src/osd/sdl/keymaps/km-de.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Keymap file for a german keyboard (Linux)
-#
-#
-ITEM_ID_TILDE SDLK_CARET 0x31 0x0 ^
-ITEM_ID_MINUS SDLK_WORLD_63 0x14 0xdf ß
-ITEM_ID_EQUALS SDLK_COMPOSE 0x15 0x0 '
-ITEM_ID_OPENBRACE SDLK_WORLD_92 0x22 0xfc Ü
-ITEM_ID_CLOSEBRACE SDLK_PLUS 0x23 0x2b +
-ITEM_ID_COLON SDLK_WORLD_86 0x2f 0xf6 Ö
-ITEM_ID_QUOTE SDLK_WORLD_68 0x30 0xe4 Ä
-ITEM_ID_BACKSLASH SDLK_LESS 0x5e 0x3c <
-ITEM_ID_SLASH SDLK_MINUS 0x3d 0x2d -
-ITEM_ID_Z SDLK_y 0x34 0x79 Y
-ITEM_ID_Y SDLK_z 0x1d 0x7a Z
-[SDL2]
-ITEM_ID_TILDE SDL_SCANCODE_GRAVE 0x35 0x0 ^
-ITEM_ID_MINUS SDL_SCANCODE_MINUS 0x2d 0x0 ß
-ITEM_ID_EQUALS SDL_SCANCODE_EQUALS 0x2e 0x0 '
-ITEM_ID_OPENBRACE SDL_SCANCODE_LEFTBRACKET 0x2f 0x0 Ü
-ITEM_ID_CLOSEBRACE SDL_SCANCODE_RIGHTBRACKET 0x30 0x0 +
-ITEM_ID_COLON SDL_SCANCODE_SEMICOLON 0x33 0x0 Ö
-ITEM_ID_QUOTE SDL_SCANCODE_APOSTROPHE 0x34 0x0 Ä
-ITEM_ID_BACKSLASH SDL_SCANCODE_BACKSLASH 0x31 0x0 #
-ITEM_ID_SLASH SDL_SCANCODE_SLASH 0x38 0x0 -
-ITEM_ID_Z SDL_SCANCODE_Y 0x34 0x79 Y
-ITEM_ID_Y SDL_SCANCODE_Z 0x1d 0x7a Z
diff --git a/src/osd/sdl/keymaps/km-fr-OSX.txt b/src/osd/sdl/keymaps/km-fr-OSX.txt
deleted file mode 100644
index fc9bbef9f7c..00000000000
--- a/src/osd/sdl/keymaps/km-fr-OSX.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-# Keymap for French AZERTY keyboard (OSX)
-ITEM_ID_1 SDLK_AMPERSAND 0x12 0x26 &
-ITEM_ID_2 SDLK_WORLD_0 0x13 0xe9
-ITEM_ID_3 SDLK_QUOTEDBL 0x14 0x22 "
-ITEM_ID_4 SDLK_QUOTE 0x15 0x27 '
-ITEM_ID_5 SDLK_LEFTPAREN 0x17 0x28 (
-ITEM_ID_6 SDLK_WORLD_1 0x16 0xa7
-ITEM_ID_7 SDLK_WORLD_3 0x1a 0xe8
-ITEM_ID_8 SDLK_EXCLAIM 0x1c 0x21 !
-ITEM_ID_9 SDLK_WORLD_2 0x19 0xe7
-ITEM_ID_0 SDLK_WORLD_4 0x1d 0xe0
-ITEM_ID_MINUS SDLK_RIGHTPAREN 0x1b 0x29 )
-ITEM_ID_EQUALS SDLK_MINUS 0x18 0x2d -
diff --git a/src/osd/sdl/keymaps/km-fr.txt b/src/osd/sdl/keymaps/km-fr.txt
deleted file mode 100644
index f68948295da..00000000000
--- a/src/osd/sdl/keymaps/km-fr.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-# Keymap for French AZERTY keyboard (Linux)
-ITEM_ID_TILDE SDLK_WORLD_18 0x31 0xb2
-ITEM_ID_1 SDLK_AMPERSAND 0xa 0x26 &
-ITEM_ID_2 SDLK_WORLD_73 0xb 0xe9
-ITEM_ID_3 SDLK_QUOTEDBL 0xc 0x22 "
-ITEM_ID_4 SDLK_QUOTE 0xd 0x27 '
-ITEM_ID_5 SDLK_LEFTPAREN 0xe 0x28 (
-ITEM_ID_6 SDLK_MINUS 0xf 0x2d -
-ITEM_ID_7 SDLK_WORLD_72 0x10 0xe8
-ITEM_ID_8 SDLK_UNDERSCORE 0x11 0x5f _
-ITEM_ID_9 SDLK_WORLD_71 0x12 0xe7
-ITEM_ID_0 SDLK_WORLD_64 0x13 0xe0
-ITEM_ID_MINUS SDLK_RIGHTPAREN 0x14 0x29 )
-ITEM_ID_EQUALS SDLK_EQUALS 0x15 0x3d =
-ITEM_ID_OPENBRACE SDLK_CARET 0x22 0x0
-ITEM_ID_CLOSEBRACE SDLK_DOLLAR 0x23 0x0
-ITEM_ID_COMMA SDLK_COMMA 0x3a 0x2c ,
-ITEM_ID_STOP SDLK_SEMICOLON 0x3b 0x3b ;
-ITEM_ID_SLASH SDLK_COLON 0x3c 0x3a :
-ITEM_ID_COLON SDLK_WORLD_89 0x30 0xf9
-ITEM_ID_QUOTE SDLK_ASTERISK 0x33 0x2a *
-ITEM_ID_BACKSLASH SDLK_EXCLAIM 0x3d 0x21 !
-ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c <
diff --git a/src/osd/sdl/keymaps/km_it.txt b/src/osd/sdl/keymaps/km_it.txt
deleted file mode 100644
index aae0a121356..00000000000
--- a/src/osd/sdl/keymaps/km_it.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-# MAME/MESS keymap for an italian PC 105-keys keyboard
-
-ITEM_ID_TILDE SDLK_BACKSLASH 0x31 0x5c \
-ITEM_ID_MINUS SDLK_QUOTE 0x14 0x27 '
-ITEM_ID_EQUALS SDLK_WORLD_76 0x15 0xec ì
-ITEM_ID_OPENBRACE SDLK_WORLD_72 0x22 0xe8 è
-ITEM_ID_CLOSEBRACE SDLK_PLUS 0x23 0x2b +
-ITEM_ID_COLON SDLK_WORLD_82 0x2f 0xf2 ò
-ITEM_ID_QUOTE SDLK_WORLD_64 0x30 0xe0 à
-ITEM_ID_BACKSLASH SDLK_WORLD_89 0x33 0xf9 ù
-ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c <
-ITEM_ID_SLASH SDLK_MINUS 0x3d 0x2d - \ No newline at end of file
diff --git a/src/osd/sdl/ledutil.sh b/src/osd/sdl/ledutil.sh
index ef9ac93d353..e91e44200de 100644
--- a/src/osd/sdl/ledutil.sh
+++ b/src/osd/sdl/ledutil.sh
@@ -1,5 +1,6 @@
#!/bin/sh
-
+# license:BSD-3-Clause
+# copyright-holders:Olivier Galibert, R. Belmont
# ============================================================
#
# ledutil.sh - Example script for output notifiers
diff --git a/src/osd/sdl/man/LICENSE b/src/osd/sdl/man/LICENSE
new file mode 100644
index 00000000000..670154e3538
--- /dev/null
+++ b/src/osd/sdl/man/LICENSE
@@ -0,0 +1,116 @@
+CC0 1.0 Universal
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator and
+subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the
+purpose of contributing to a commons of creative, cultural and scientific
+works ("Commons") that the public can reliably and without fear of later
+claims of infringement build upon, modify, incorporate in other works, reuse
+and redistribute as freely as possible in any form whatsoever and for any
+purposes, including without limitation commercial purposes. These owners may
+contribute to the Commons to promote the ideal of a free culture and the
+further production of creative, cultural and scientific works, or to gain
+reputation or greater distribution for their Work in part through the use and
+efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation
+of additional consideration or compensation, the person associating CC0 with a
+Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
+and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
+and publicly distribute the Work under its terms, with knowledge of his or her
+Copyright and Related Rights in the Work and the meaning and intended legal
+effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not limited
+to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display, communicate,
+ and translate a Work;
+
+ ii. moral rights retained by the original author(s) and/or performer(s);
+
+ iii. publicity and privacy rights pertaining to a person's image or likeness
+ depicted in a Work;
+
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+
+ v. rights protecting the extraction, dissemination, use and reuse of data in
+ a Work;
+
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation thereof,
+ including any amended or successor version of such directive); and
+
+ vii. other similar, equivalent or corresponding rights throughout the world
+ based on applicable law or treaty, and any national implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention of,
+applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
+unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
+and Related Rights and associated claims and causes of action, whether now
+known or unknown (including existing as well as future claims and causes of
+action), in the Work (i) in all territories worldwide, (ii) for the maximum
+duration provided by applicable law or treaty (including future time
+extensions), (iii) in any current or future medium and for any number of
+copies, and (iv) for any purpose whatsoever, including without limitation
+commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
+the Waiver for the benefit of each member of the public at large and to the
+detriment of Affirmer's heirs and successors, fully intending that such Waiver
+shall not be subject to revocation, rescission, cancellation, termination, or
+any other legal or equitable action to disrupt the quiet enjoyment of the Work
+by the public as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason be
+judged legally invalid or ineffective under applicable law, then the Waiver
+shall be preserved to the maximum extent permitted taking into account
+Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
+is so judged Affirmer hereby grants to each affected person a royalty-free,
+non transferable, non sublicensable, non exclusive, irrevocable and
+unconditional license to exercise Affirmer's Copyright and Related Rights in
+the Work (i) in all territories worldwide, (ii) for the maximum duration
+provided by applicable law or treaty (including future time extensions), (iii)
+in any current or future medium and for any number of copies, and (iv) for any
+purpose whatsoever, including without limitation commercial, advertising or
+promotional purposes (the "License"). The License shall be deemed effective as
+of the date CC0 was applied by Affirmer to the Work. Should any part of the
+License for any reason be judged legally invalid or ineffective under
+applicable law, such partial invalidity or ineffectiveness shall not
+invalidate the remainder of the License, and in such case Affirmer hereby
+affirms that he or she will not (i) exercise any of his or her remaining
+Copyright and Related Rights in the Work or (ii) assert any associated claims
+and causes of action with respect to the Work, in either case contrary to
+Affirmer's express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+
+ b. Affirmer offers the Work as-is and makes no representations or warranties
+ of any kind concerning the Work, express, implied, statutory or otherwise,
+ including without limitation warranties of title, merchantability, fitness
+ for a particular purpose, non infringement, or the absence of latent or
+ other defects, accuracy, or the present or absence of errors, whether or not
+ discoverable, all to the greatest extent permissible under applicable law.
+
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without limitation
+ any person's Copyright and Related Rights in the Work. Further, Affirmer
+ disclaims responsibility for obtaining any necessary consents, permissions
+ or other rights required for any use of the Work.
+
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to this
+ CC0 or use of the Work.
+
+For more information, please see
+<http://creativecommons.org/publicdomain/zero/1.0/>
diff --git a/src/osd/sdl/man/README.md b/src/osd/sdl/man/README.md
new file mode 100644
index 00000000000..61036986e6a
--- /dev/null
+++ b/src/osd/sdl/man/README.md
@@ -0,0 +1,5 @@
+# **man pages** #
+
+man pages for MAME and its tools is work of many different contributors, and contain information about usage of MAME and utilities that are comming in package.
+
+Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file
diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp
index 1a52a105fd5..66bca69b1cf 100644
--- a/src/osd/sdl/sdlmain.cpp
+++ b/src/osd/sdl/sdlmain.cpp
@@ -270,8 +270,7 @@ void sdl_osd_interface::osd_exit()
if (!SDLMAME_INIT_IN_WORKER_THREAD)
{
- /* FixMe: Bug in SDL2.0, Quitting joystick will cause SIGSEGV */
- SDL_QuitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO /*| SDL_INIT_JOYSTICK */);
+ SDL_QuitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER );
}
}
@@ -490,9 +489,9 @@ void sdl_osd_interface::init(running_machine &machine)
{
#ifdef SDLMAME_EMSCRIPTEN
// timer brings in threads which are not supported in Emscripten
- if (SDL_InitSubSystem(SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) {
+ if (SDL_InitSubSystem(SDL_INIT_VIDEO| SDL_INIT_GAMECONTROLLER|SDL_INIT_NOPARACHUTE)) {
#else
- if (SDL_InitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) {
+ if (SDL_InitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO| SDL_INIT_GAMECONTROLLER|SDL_INIT_NOPARACHUTE)) {
#endif
osd_printf_error("Could not initialize SDL %s\n", SDL_GetError());
exit(-1);
diff --git a/src/osd/sdl/taputil.sh b/src/osd/sdl/taputil.sh
index 669d652436e..1a22048b9ca 100644
--- a/src/osd/sdl/taputil.sh
+++ b/src/osd/sdl/taputil.sh
@@ -1,5 +1,6 @@
#!/bin/sh
-
+# license:BSD-3-Clause
+# copyright-holders:Carl
NAME=$2
OURUID=`id -u $NAME`
HOSTIP=$4
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index 2a0147afea5..483ad426186 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -184,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_JOYSTICK|SDL_INIT_NOPARACHUTE))
+ if (SDL_InitSubSystem(SDL_INIT_TIMER|SDL_INIT_AUDIO| SDL_INIT_VIDEO| SDL_INIT_GAMECONTROLLER|SDL_INIT_NOPARACHUTE))
{
osd_printf_error("Could not initialize SDL: %s.\n", SDL_GetError());
exit(-1);
diff --git a/tests/LICENSE b/tests/LICENSE
new file mode 100644
index 00000000000..4d9210d10e1
--- /dev/null
+++ b/tests/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2016, MAME Development Team
+All rights reserved.
+
+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 bsd3 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/tests/README.md b/tests/README.md
new file mode 100644
index 00000000000..a7a0e9e85a3
--- /dev/null
+++ b/tests/README.md
@@ -0,0 +1,5 @@
+# **Tests** #
+
+Cointains code by various developers and it is used to test MAME
+
+Licensed under [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause)
diff --git a/tests/lib/util/corestr.cpp b/tests/lib/util/corestr.cpp
index fa2dcabf48b..3da0bc75541 100644
--- a/tests/lib/util/corestr.cpp
+++ b/tests/lib/util/corestr.cpp
@@ -1,6 +1,3 @@
-// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
-
#include "gtest/gtest.h"
#include "corestr.h"
diff --git a/tests/main.cpp b/tests/main.cpp
index a3ba19293f9..5a07b837186 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -1,6 +1,3 @@
-// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
-
#include <stdio.h>
#include "gtest/gtest.h"